Part Number Hot Search : 
PBD3534 12232 AQV252AX 6KE200A BLV2045N MC32C1 1N5223C MAX618
Product Description
Full Text Search
 

To Download XR16L78805 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  exar corporation 48720 kato road, fremont ca, 94538 ? (510) 668-7000 ? fax (510) 668-7017 ? www.exar.com xr xr16l788 high performance 2.97v to 5.5v octal uart october 2005 rev. 1.2.2 general description the xr16l7881 (788), is a 2.97v to 5.5v with 5v tolerant inputs octal un iversal asynchronous receiver and transmitter (uart). the highly integrated device is designed for high bandwidth requirement in communication systems. the global interrupt source register provides a complete interrupt status indication for all 8 channels to speed up interrupt parsing. each uart has its own 16c550 compatible set of configuration registers, tx and rx fifos of 64 bytes, fully programmable transmit and receive fifo trigger levels , tx and rx fifo level counters, automatic rts/ct s or dtr/dsr hardware flow control with programma ble hysteresis, autoamtic software (xon/xoff) flow co ntrol, rs-485 half-duplex direction control with programmable turn-around delay, intel or motorola bus interface and sleep mode with a wake-up indicator. n ote : covered by us patents #5,649,122 and #5,949,787 applications ? remote access servers ? ethernet network to serial ports ? network management ? factory automation and process control ? point-of-sale systems ? multi-port rs-232/rs-422/rs-485 cards features ? 2.97v to 5.5v with 5v tolerant inputs operation ? single interrupt output for all 8 uarts ? global interrupt source for all 8 uarts ? 5g ?flat? uart registers for configurations ? simultaneous uart cha nnels initialization ? auto rs485 half-duplex control with program- mable turn-around delay ? a general purpose 16 -bit timer/counter ? sleep mode with wake-up indication ? highly integrated device for space saving ? first eight registers are 16c550 compatible ? 64-byte transmit and receive fifos ? transmit and receive fifo level counters ? programmable tx and rx fifo trigger levels ? automatic rts/cts or dtr/dsr flow control ? selectable hardware fl ow control hysteresis ? automatic xon/xoff soft ware flow control with status indicator ? infrared (irda 1.0) data encoder/decoder ? programmable data rate with prescaler ? up to 6.25 mbps serial data rate at 5v ? 100-pin qfp package (14x20x3 mm) f igure 1. b lock d iagram tmrck device configuration registers xtal1 xtal2 crystal osc/buffer uart channel 0 tx0, rx0, dtr0#, dsr0#, rts0#, cts0#, cd0#, ri0# data bus interface rst# a7:a0 ior# iow# cs# int# tx7, rx7, dtr7#, dsr7#, rts7#, cts7#, cd7#, ri7# uart channel 7 uart channel 6 uart channel 5 uart channel 4 uart channel 3 uart channel 2 uart channel 1 16-bit timer/counter 64 byte tx fifo 64 byte rx fifo brg ir endec tx & rx uart regs d7:d0 16/68#
xr16l788 xr high performance 2.97v to 5.5v octal uart rev. 1.2.2 2 f igure 2. p in o ut of the d evice ordering information p art n umber p ackage o perating t emperature r ange d evice s tatus xr16l788cq 100-lead qfp 0c to +70c active xr16l788iq 100-lead qfp -40c to +85c active rst# 16/68# vcc gnd d7 d6 d5 d4 d3 d2 d1 d0 iow# tmrck enir cs# int# vcc gnd ior# a7 a6 a5 a4 a3 a2 a1 a0 vcc gnd 2 4567 9 8 3 1101113 12 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 71 70 68 69 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 81 82 84 83 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 xr16l788 100-qfp rx7 tx4 dtr4# rts4# ri4# cd4# dsr4# cts4# rx4 tx5 dtr5# rts5# ri5# cd5# dsr5# 72 73 74 75 76 77 78 80 79 cts7# dsr7# cd7# ri7# rts7# dtr7# tx7 rx6 cts6# dsr6# cd6# ri6# rts6# dtr6# tx6 gnd vcc rx5 cts5# tx3 dtr3# rts3# ri3# cd3# dsr3# cts3# rx3 tx2 dtr2# rts2# ri2# cd2# dsr2# cts2# rx2 rx0 cts0# dsr0# cd0# ri0# rts0# dtr0# tx0 rx1 cts1# dsr1# cd1# ri1# rts1# dtr1# tx1 vcc gnd xtal1 xtal2 31 32 34 33 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
xr xr16l788 rev. 1.2.2 high performance 2.97v to 5.5v octal uart 3 pin descriptions n ame p in # t ype d escription data bus interface a7:a0 20-27 i address data lines [7:0]. a0:a3 selects individual uart?s 16 configuration registers, a4:a6 selects uart channel 0 to7, and a7 selects the global device configuration registers. d7:d0 5-12 io data bus lines (7:0] (bidirectional). ior# 19 i when 16/68# pin is high, it selects intel bus interface and this input is read strobe (active low). the falling edge instigates an internal read cycle and retrieves the data byte from an internal register pointed by the address lines [a7:a0], places it on the data bus to allow the host processor to read it on the leading edge. when 16/68# pin is low, it selects motorola bus interface and this input should be connected to vcc. iow# 13 i when 16/68# pin is high, it selects intel bus interface and this input becomes write strobe (active low) . the falling edge instigates the internal write cycle and the leading edge transfers the data byte on the data bus to an internal register pointed by the address lines. when 16/68# pin is low, it selects motorola bus interface and this input becomes read (high) and write (low) signal (r/w#). cs# 30 i when 16/68# pin is high, this input is chip select (active low) to enable the xr16l788 device. when 16/68# pin is low, this input bec omes the read and write strobe (active low) for the motorola bus interface. int# 16 od global interrupt output from xr16l788 (o pen drain, active low). this output requires an external pull-up resistor (47k-100k ohms) to operate properly. it may be shared with other devices in th e system to form a single interrupt line to the host processor and have the software driver polls each device for the interrupt status. modem or serial i/o interface tx0 93 o uart channel 0 transmit data or infrared transmit data. rx0 100 i uart channel 0 receive data or infrared receive data. normal rxd input idles high. the infrared pulses can be in verted internally prior the decoder by fctr[4]. rts0# 95 o uart channel 0 request to send or gener al purpose output (active low). this port may be used for one of two functions: 1) auto hardware flow control, see efr bit-6, mcr bits-1 & 2, fctr bits 0-3 and ier bit-6 2) rs485 half-duplex direction control, see fctr bit-5, mcr bit-2 and msr bits 4-7. cts0# 99 i uart channel 0 clear to send or general purpose input (active low). it can be used for auto hardware flow control, see efr bit-7, mcr bit-2 and ier bit-7. dtr0# 94 o uart channel 0 data terminal ready or general purpose output (active low). this port may be used one of two functions. 1) auto hardware flow control, see efr bit-6, fctr bits-0 to 3, mcr bits-0 & 2, and ier bit-6 2) rs485 half-duplex direction control, see fctr bit-5, mcr bit-2 and msr bit 4-7. dsr0# 98 i uart channel 0 data set ready or gener al purpose input (active low). it can be used for auto hardware flow control, see efr bit-7, mcr bit-2 and ier bit- 7.
xr16l788 xr high performance 2.97v to 5.5v octal uart rev. 1.2.2 4 cd0# 97 i uart channel 0 carrier detect or general purpose input (active low). ri0# 96 i uart channel 0 ring indicator or general purpose input (active low). tx1 85 o uart channel 1 transmit data or infrared transmit data. rx1 92 i uart channel 1 receive data or infrared receive data. normal rxd input idles high. the infrared pulses can be in verted internally prior the decoder by fctr[4]. rts1# 87 o uart channel 1 request to send or gene ral purpose output (active low). see description of rts0# pin. cts1# 91 i uart channel 1 clear to send or general purpose input (active low). see description of cts0# pin. dtr1# 86 o uart channel 1 data terminal ready or general purpose output (active low). see description of dtr0# pin. dsr1# 90 i uart channel 1 data set ready or general purpose input (active low). see description of dsr0# pin. cd1# 89 i uart channel 1 carrier detect or general purpose input (active low). ri1# 88 i uart channel 1 ring indicator or general purpose input (active low). tx2 80 o uart channel 2 transmit data or infrared transmit data. rx2 73 i uart channel 2 receive data or infrared receive data. normal rxd input idles high. the infrared pulses can be in verted internally prior the decoder by fctr[4]. rts2# 78 o uart channel 2 request to send or gene ral purpose output (active low). see description of rts0# pin. cts2# 74 i uart channel 2 clear to send or general purpose input (active low). see description of cts0# pin. dtr2# 79 o uart channel 2 data terminal ready or general purpose output (active low). see description of dtr0# pin. dsr2# 75 i uart channel 2 data set ready or general purpose input (active low). see description of dsr0# pin. cd2# 76 i uart channel 2 carrier detect or general purpose input (active low). ri2# 77 i uart channel 2 ring indicator or general purpose input (active low). tx3 72 o uart channel 3 transmit data or infrared transmit data. rx3 65 i uart channel 3 receive data or infrared receive data. normal rxd input idles high. the infrared pulses can be in verted internally prior the decoder by fctr[4]. rts3# 70 o uart channel 3 request to send or gene ral purpose output (active low). see description of rts0# pin. cts3# 66 i uart channel 3 clear to send or general purpose input (active low). see description of cts0# pin. dtr3# 71 o uart channel 3 data terminal ready or general purpose output (active low). see description of dtr0# pin. dsr3# 67 i uart channel 3 data set ready or general purpose input (active low). see description of dsr0# pin. cd3# 68 i uart channel 3 carrier detect or general purpose input (active low). ri3# 69 i uart channel 3 ring indicator or general purpose input (active low). n ame p in #t ype d escription
xr xr16l788 rev. 1.2.2 high performance 2.97v to 5.5v octal uart 5 tx4 64 o uart channel 4 transmit data or infrared transmit data. rx4 57 i uart channel 4 receive data or infrared receive data. normal rxd input idles high. the infrared pulses can be in verted internally prior the decoder by fctr[4]. rts4# 62 o uart channel 4 request to send or gen eral purpose output (active low). see description of rts0# pin. cts4# 58 i uart channel 4 clear to send or general purpose input (active low). see description of cts0# pin. dtr4# 63 o uart channel 4 data terminal ready or general purpose output (active low). see description of dtr0# pin. dsr4# 59 i uart channel 4 data set ready or general purpose input (active low). see description of dsr0# pin. cd4# 60 i uart channel 4 carrier detect or general purpose input (active low). ri4# 61 i uart channel 4 ring indicator or general purpose input (active low). tx5 56 o uart channel 5 transmit data or infrared transmit data. rx5 49 i uart channel 5 receive data or infrared receive data. normal rxd input idles high. the infrared pulses can be in verted internally prior the decoder by fctr[4]. rts5# 54 o uart channel 5 request to send or gen eral purpose output (active low). see description of rts0# pin. cts5# 50 i uart channel 5 clear to send or general purpose input (active low). see description of cts0# pin. dtr5# 55 o uart channel 5 data terminal ready or general purpose output (active low). see description of dtr0# pin. dsr5# 51 i uart channel 5 data set ready or general purpose input (active low). see description of dsr0# pin. cd5# 52 i uart channel 5 carrier detect or general purpose input (active low). ri5# 53 i uart channel 5 ring indicator or general purpose input (active low). tx6 46 o uart channel 6 transmit data or infrared transmit data. rx6 39 i uart channel 6 receive data or infrared receive data. normal rxd input idles high. the infrared pulses can be in verted internally prior the decoder by fctr[4]. rts6# 44 o uart channel 6 request to send or gen eral purpose output (active low). see description of rts0# pin. cts6# 40 i uart channel 6 clear to send or general purpose input (active low). see description of cts0# pin. dtr6# 45 o uart channel 6 data terminal ready or general purpose output (active low). see description of dtr0# pin. dsr6# 41 i uart channel 6 data set ready or general purpose input (active low). see description of dsr0# pin. cd6# 42 i uart channel 6 carrier detect or general purpose input (active low). ri6# 43 i uart channel 6 ring indicator or general purpose input (active low). tx7 38 o uart channel 7 transmit data or infrared transmit data. n ame p in #t ype d escription
xr16l788 xr high performance 2.97v to 5.5v octal uart rev. 1.2.2 6 n ote : pin type: i=input, o=output, io= in put/output, od=output open drain. rx7 31 i uart channel 7 receive data or infrared receive data. normal rxd input idles high. the infrared pulses can be in verted internally prior the decoder by fctr[4]. rts7# 36 o uart channel 7 request to send or gene ral purpose output (active low). see description of rts0# pin. cts7# 32 i uart channel 7 clear to send or general purpose input (active low). see description of cts0# pin. dtr7# 37 o uart channel 7 data terminal ready or general purpose output (active low). see description of dtr0# pin. dsr7# 33 i uart channel 7 data set ready or general purpose input (active low). see description of dsr0# pin. cd7# 34 i uart channel 7 carrier detect or general purpose input (active low). ri7# 35 i uart channel 7 ring indicator or general purpose input (active low). ancillary signals xtal1 82 i crystal or external clock input. caut ion: this input is not 5v tolerant. xtal2 81 o crystal or buffered clock output. tmrck 14 i 16-bit timer/counter ex ternal clock input. enir 15 i infrared mode enable (active high). this pin is sampled during power up, fol - lowing a hardware reset (rst#) or soft-reset (register reset). it can be used to start up all 8 uarts in the infrared mode. the sampled logic state is transferred to mcr bit-6 in the uart. rst# 1 i reset (active low). the configuration and uart registers are reset to default values, see table 19 . 16/68# 2 i intel or motorola data bus interface select. the intel bus interface is selected when this input is high and the motoro la bus interface is selected when this input is low. this input affects th e functionality of ior#, iow# and cs# pins. vcc 3,17,28,48,84 +2.97v to 5.5v supply with 5v tolerant inputs (except xtal1). gnd 4,18,29,47,83 power supply common, ground. n ame p in #t ype d escription
xr xr16l788 rev. 1.2.2 high performance 2.97v to 5.5v octal uart 7 1.0 description the xr16l788 (788) integrates the functions of 8 en hanced 16550 uarts, a general purpose 16-bit timer/ counter and an on-chip oscillato r. the device configuration registers incl ude a set of four co nsecutive interrupt source registers that provides interrupt-status for all 8 uarts, timer/counter and a sleep wake up indicator. each uart channel has its own 16550 uart compatible configuration register set for individual channel control, status, and data transfer. additionally, each uart channel has 64-byte of transmit and receive fifos, automatic rts/cts or dtr/dsr hardware flow control with hysteresis contro l, automatic xon/xoff and special character software flow control, programmable transmit and receive fifo trigger le vels, fifo level counters, infrared encoder and decoder (irda ver. 1.0), programmabl e baud rate generator with a prescaler of divide by 1 or 4, and data rate up to 6.25 mbps with 8x sampling clock or 3.125mbps with 16x sampling clock. the xr16l788 is a 5v and 3.3v device with 5 volt tolerant inputs (except xtal1). 2.0 functional descriptions 2.1 device reset 2.1.1 hardware reset the rst# input resets the internal registers and the serial interface outputs in all 8 channels to their default state (see ta b l e 19 ). a low pulse of longer than 40 ns duration will be required to activate the reset function in the device. 2.1.2 software reset the internal registers of each uart can be reset by wr iting to the reset register in the device configuration registers. for more details, see the reset register description on page 25 . 2.2 uart channel selection the uart provides the user with the capability to bi-directionally tr ansfer information be tween an external cpu and an external serial communication device. a logic 0 on the chip select pins, cs#, allows the user to select one of the uart channels to configure, send transmit data and/or unload receive data to/from the uart. when address line a7 = 0, address lines a6:a4 are used to select one of the eight channels. see table 1 below for uart channel selection. 2.3 simultaneous write to all channels during a write cycle, the setting of regb bit-0 to a logic 1 will override th e channel selection of address a6:a4 and allow a simultaneous write to all 8 uart channel s when any channel is written to. this functional capability allow the registers in all 8 uart channels to be modified concurrently , saving individual channel initialization time. caution should be considered, however, when using this capability. any in-process serial data transfer may be disrupted by changing an active channel?s mode. also, regb bit-0 should be reset to a logic 0 before a ttempting to read from the uart. t able 1: uart c hannel s election a7 a6 a5 a4 f unction 0 0 0 0 channel 0 selected 0 0 0 1 channel 1 selected 0 0 1 0 channel 2 selected 0 0 1 1 channel 3 selected 0 1 0 0 channel 4 selected 0 1 0 1 channel 5 selected 0 1 1 0 channel 6 selected 0 1 1 1 channel 7 selected
xr16l788 xr high performance 2.97v to 5.5v octal uart rev. 1.2.2 8 2.4 int# ouput the int# interrupt output changes according to the operating mode and enhanced features setup. table 2 and 3 summarize the operating behavior for the transmitter and receiver. 2.5 crystal oscillator / buffer the 788 includes an on-chip oscillator (xtal1 and xtal2) . the crystal oscillator provides the system clock to the baud rate generators (brg) in each of the 8 ua rts, the 16-bit general purpose timer/counter and internal logics. xtal1 is the input to the oscillator or external clock buffer input with xtal2 pin being the output. for programming details, see ?section 2.6, programmable baud rate generator? on page 9 . the on-chip oscillator is designed to use an industry standard micropro cessor crystal (p arallel resonant, fundamental frequency with 10-22 pf capacitance load, esr of 20-120 ohms and 100ppm frequency tolerance) connected externally between the xtal1 and xtal2 pins (see figure 3 ). alternatively, an external clock can be connected to the xtal1 pin to clock the internal 8 baud rate generators for standard or custom rates. typically, the oscillato r connections are shown in figure 3 . for further reading on oscillator circuit please see application note da n108 on exar?s web site. t able 2: int# p in o peration for t ransmitter auto rs485 mode fcr b it -0 = 0 (fifo d isabled ) fcr b it -0 = 1 (fifo e nabled ) int# pin no high = a byte in thr low = thr empty high = fifo above trigger level low = fifo below trigger level or fifo empty int# pin yes high = a byte in thr low = transmitter empty high = fifo above trigger level low = fifo below trigger level or transmitter empty t able 3: int# p in o peration f or r eceiver fcr b it -0 = 0 (fifo d isabled ) fcr b it -0 = 1 (fifo e nabled ) int# pin high = no data low = 1 byte high = fifo below trigger level low = fifo above trigger level f igure 3. t ypical oscillator connections c1 22-47pf c2 22-47pf 14.7456 mhz xtal1 xtal2 r=300k to 400k
xr xr16l788 rev. 1.2.2 high performance 2.97v to 5.5v octal uart 9 2.6 programmable baud rate generator a single baud rate generator (brg) is provided for the transmitter and receiver, allowing independent tx/rx channel control. the programmable baud rate generator is capable of operating with a crystal frequency of up to 24 mhz. however, with an external clock input on xtal1 pin and a 2k ohms pull-up resistor on xtal2 pin (as shown in figure 4 ) it can extend its operation up to 50 mhz (3.125 mbps serial data rate) at room temperature and 5.0v. f igure 4. e xternal c lock c onnection for e xtended d ata r ate each uart has its own baud rate generator (brg) with a prescaler for the transmitter and receiver. the prescaler is controlled by a software bit in the mcr register. the mcr register bit-7 sets the prescaler to divide the input crystal or external clock by 1 or 4. the outpu t of the prescaler clocks to the brg. the brg further divides this clock by a programmable divisor between 1 and (2 16 -1) to obtain a 16x or 8x sampling clock of the serial data rate. the sampling clock is used by the transmitter for data bit shifting and receiver for data sampling. the brg divisor (dll and dlm registers) defaul ts to a random value upon power up. therefore, the brg must be programmed during initializ ation to the operating data rate. f igure 5. b aud r ate g enerator 2k xtal1 xtal2 r1 vcc external clock vcc gnd xtal1 xtal2 crystal osc/ buffer mcr bit-7=0 (default) mcr bit-7=1 dll and dlm registers prescaler divide by 1 prescaler divide by 4 16x or 8x sampling rate clock to transmitter and receiver to other channels baud rate generator logic
xr16l788 xr high performance 2.97v to 5.5v octal uart rev. 1.2.2 10 programming the ba ud rate generator regi sters dlm and dll provides th e capability of selecting the operating data rate. table 4 shows the standard data rates availabl e with a 14.7456 mhz crystal or external clock at 16x clock rate. at 8x sampling rate, these data rates would double. when using a non-standard data rate crystal or external clock, th e divisor value can be calculated for channel ?n? with the fo llowing equation(s). 2.7 transmitter the transmitter section comprises of an 8-bit transmit shift register (tsr) and 64 bytes of fifo which includes a byte-wide transmit holding register (thr). tsr shifts out every data bit with the 16x internal clock. a bit time is 16 clock periods (see emsr bit- 7). the transmitter sends the start-bit followed by the number of data bits, inserts the proper parity-bit if enabl ed, and adds the stop-bit(s). the status of the fifo and tsr are reported in the line status register (lsr bit-5 and bit-6). 2.7.1 transmit holding regi ster (thr) - write only the transmit holding register is an 8-bit register pr oviding a data interface to the host processor. the host writes transmit data byte to the thr to be converted in to a serial data stream including start-bit, data bits, parity-bit and stop-bit(s). the least-si gnificant-bit (bit-0) becomes first data bit to go out. the thr is the input register to the transmit fifo of 64 bytes when fifo operation is enabl ed by fcr bit-0. every time a write operation is made to the thr, the fifo data pointer is automatically bumped to the next sequential data location. 2.7.2 transmitter operation in non-fifo mode the host loads transmit data to thr one character at a time. the thr empty flag (lsr bit-5) is set when the data byte is transferred to tsr. thr flag can generate a tr ansmit empty interrupt (isr bit-1) when it is enabled by ier bit-1. the tsr flag (lsr bit-6) is set when tsr beco mes completely empty. divisor (decimal) = (xtal1 clock frequency / prescaler) / (serial data rate x 16), when 8xmode- bit n is 0 divisor (decimal) = (xtal1 clock frequency / prescaler) / (serial data rate x 8), when 8xmode- bit n is 1 t able 4: t ypical data rates with a 14.7456 mh z crystal or external clock at 16x s ampling o utput data rate mcr bit-7=1 o utput data rate mcr bit-7=0 d ivisor for 16x clock (decimal) d ivisor for 16x clock (hex) dlm p rogram v alue (hex) dll p rogram v alue (hex) d ata r ate e rror (%) 100 400 2304 900 09 00 0 600 2400 384 180 01 80 0 1200 4800 192 c0 00 c0 0 2400 9600 96 60 00 60 0 4800 19.2k 48 30 00 30 0 9600 38.4k 24 18 00 18 0 19.2k 76.8k 12 0c 00 0c 0 38.4k 153.6k 6 06 00 06 0 57.6k 230.4k 4 04 00 04 0 115.2k 460.8k 2 02 00 02 0 230.4k 921.6k 1 01 00 01 0
xr xr16l788 rev. 1.2.2 high performance 2.97v to 5.5v octal uart 11 2.7.3 transmitter operation in fifo mode the host may fill the transmit fifo with up to 64 bytes of transmit data. t he thr empty flag (lsr bit-5) is set whenever the fifo is empty. the thr empty flag can ge nerate a transmit empty interrupt (isr bit-1) when the amount of data in the fifo falls below its programmed trig ger level. the transmit empty interrupt is enabled by ier bit-1. the tsr flag (lsr bit-6) is set when tsr/fifo becomes empty. 2.8 receiver the receiver section contains an 8-bit receive shift register (rsr) and 64 bytes of fifo which includes a byte-wide receive holding regi ster (rhr). the rsr uses the 16x for ti ming. it verifies and validates every bit on the incoming character in the middle of each data bit. on the falling edge of a start or false start bit, an internal receiver counter star ts counting at the 16x. after 8 clocks the start bit period should be at the center of the start bit. at this time the start bit is sampled and if it is still a logic 0 it is validated. evaluati ng the start bit in this manner prevents the receiver from assembling a false ch aracter. the rest of the data bits and stop bits are sampled and validated in this same manner to prevent false framing. if there were any error(s), they are reported in the lsr register bits 2-4. upon unloading the receive data byte from rhr, the receive fifo pointer is bumped and the error tags are immediately updated to reflect the status of the data byte in rhr register. rhr can generate a receive data ready interrupt upon receiv ing a character or delay until it reaches the fifo trigger level. furthermore, data delivery to the host is guaranteed by a receive data ready time-out interrupt when data is not received for 4 word lengths as defined by lcr[1:0] plus 12 bits time . this is equivalent to 3.7- 4.6 character times. the rhr interrupt is enabled by ier bit-0. f igure 6. t ransmitter o peration in non -fifo m ode f igure 7. t ransmitter o peration in fifo and f low c ontrol m ode transmit holding register (thr) transmit shift register (tsr) data byte l s b m s b thr interrupt (isr bit-1) enabled by ier bit-1 txnofifo1 16x or 8x clock transmit data shift register (tsr) transmit data byte thr interrupt (isr bit-1) falls below the programmed trigger level and then when becomes empty. fifo is enabled by fcr bit-0=1 transmit fifo 16x or 8x clock auto cts flow control (cts# pin) auto software flow control flow control characters (xoff1/2 and xon1/2 reg. txfifo1
xr16l788 xr high performance 2.97v to 5.5v octal uart rev. 1.2.2 12 2.8.1 receive holding regi ster (rhr) - read-only the receive holding register is an 8-bit register that holds a receive data byte from the receive shift register. it provides the receive data interface to the host processor. the rhr register is part of the receive fifo of 64 bytes by 11-bits wide, the 3 extra bits are fo r the 3 error tags to be reported in lsr register. when the fifo is enabled by fcr bit-0, the rhr contains the first data character received by the fifo. after the rhr is read, the next character byte is loaded into the rhr and the errors associated with the current data byte are immediately updated in the lsr bits 2-4. n ote : table-b selected as trigger table for figure 9 ( table 14 ) . f igure 8. r eceiver o peration in non -fifo m ode f igure 9. r eceiver o peration in fifo and a uto rts f low c ontrol m ode receive data shift register (rsr) receive data byte and errors rhr interrupt (isr bit-2) receive data holding register (rhr) rxfifo1 16x or 8x clock receive data characters data bit validation error tags in lsr bits 4:2 receive data shift register (rsr) rxfifo1 16x or 8x clock error tags (64-sets) error tags in lsr bits 4:2 64 bytes by 11-bit wide fifo receive data characters fifo trigger=16 example: - rx fifo trigger level selected at 16 bytes (see note below) data fills to 24 data falls to 8 data bit validation receive data fifo receive data receive data byte and errors rhr interrupt (isr bit-2) programmed for desired fifo trigger level. fifo is enabled by fcr bit-0=1 rts# de-asserts when data fills above the flow control trigger level to suspend remote transmitter. enable by efr bit-6=1, mcr bit-2. rts# re-asserts when data falls below the flow control trigger level to restart remote transmitter. enable by efr bit-6=1, mcr bit-2.
xr xr16l788 rev. 1.2.2 high performance 2.97v to 5.5v octal uart 13 2.9 thr and rhr register locations the thr and rhr register ad dresses for channel 0 to channel 7 is shown in table 5 below. the thr and rhr for channels 0 to 7 are located at address 0x 00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x60 and 0x70 respectively. transmit data byte is loaded to the th r when writing to that address and receive data is unloaded from the rhr register when reading that address. both thr and rhr registers are 16c550 compatible in 8-bit format, so each bus operation can only write or read in bytes. . 2.10 automatic rts/dtr hardwa re flow control operation automatic rts/dtr flow control is used to prevent dat a overrun to the local receiver fifo. the rts#/dtr# output pin is used to request remote unit to suspend/ resume data transmission. the flow control features are individually selected to fit specif ic application re quirement (see figure 10 ): ? select rts (and cts) or dtr (and dsr) through mcr bit-2. ? enable auto rts/dtr flow control using efr bit-6. ? the auto rts or auto dtr function must be started by asserting the rts# or dtr# output pin (mcr bit-1 or bit-0 to a logic 1, respectively) after it is enabled. ? if using programmable rx fifo trigger levels, hyster esis levels can be selected via fctr bits 3-0. with the auto rts functi on enabled, the rts# output pin will not be de-asserted (high) when the receive fifo reaches the progr ammed trigger level, but will be de-asserted when the fifo reaches the next trigger level for trigger tables a-c ( see table 14 ). the rts# output pin will be asse rted (low) again after the fifo is unloaded to the next trigger level below the programmed trigger level. t able 5: t ransmit and r eceive h olding r egister l ocations , 16c550 compatible thr and rhr address locations for ch0 to ch7 (16c550 compatible) ch0 0x00 write thr ch0 0x00 read rhr ch1 0x10 write thr ch1 0x10 read rhr ch2 0x20 write thr ch2 0x20 read rhr ch3 0x30 write thr ch3 0x30 read rhr ch4 0x40 write thr ch4 0x40 read rhr ch5 0x50 write thr ch5 0x50 read rhr ch6 0x60 write thr ch6 0x60 read rhr ch7 0x70 write thr ch7 0x70 read rhr thrrhr1 bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0
xr16l788 xr high performance 2.97v to 5.5v octal uart rev. 1.2.2 14 for trigger table d (or programmable trigger levels), th e rts# output pin is de-asserted when the the rx fifo level reaches the rx trigger level plus the hysteres is level and is a sserted when the rx fifo level falls below the rx trigger level mi nus the hysteresis level. however, even under these conditions, the 788 will continue to accept data un til the receive fifo is full if the remote uart transmitter continues to send data. ? if used, enable rts/dtr interrupt through ier bit-6 (after setting efr bit-4). the uart issues an interrupt when the rts#/dtr# pin makes a tran sition: isr bit-5 will be set to 1. 2.10.1 auto cts/dsr flow control automatic cts/dsr flow control is used to prevent data overrun to the remote receiver fifo. the cts/dsr pin is monitored to suspend/restart local transmitter. the flow control features are individually selected to fit specific application requirement (see figure 10 ): ? select cts (and rts) or dsr (and dtr) through mcr bit-2. ? enable auto cts/dsr flow control using efr bit-7. with the auto cts or auto dtr func tion enabled, the uart will suspend trans mission as soon as the stop bit of the character in the transmit shift register has been shifted out. transmission is resumed after the cts#/ dtr# input is re-asserte d (logic 0), indicating more data may be sent. ? if used, enable cts/dsr interrupt through ier bit-7 (aft er setting efr bit-4). the uart issues an interrupt when the cts#/dsr# pin makes a transition: isr bit- 5 will be set to a logic 1, and uart will suspend tx transmissions as soon as the stop bit of the character in process is shifted out. transmission is resumed after the cts#/dsr# input returns low, indicating more data may be sent.
xr xr16l788 rev. 1.2.2 high performance 2.97v to 5.5v octal uart 15 f igure 10. a uto rts/dtr and cts/dsr f low c ontrol o peration the local uart (uarta) starts data transfer by asserting rtsa# (1). rtsa# is normally connected to ctsb# (2) of remote uart (uartb). ctsb# allows its transmitter to se nd data (3). txb data arrives and fills uarta receive fifo (4). when rxa data fills up to its receive fifo trigger le vel, uarta activates its rxa data ready interrupt (5) and con - tinues to receive and put data into its fifo. if interrupt se rvice latency is long and data is not being unloaded, uarta monitors its receive data fill level to match the upper thre shold of rts delay and de-assert rtsa# (6). ctsb# follows (7) and request uartb transmitter to suspend data transfer. ua rtb stops or finishes sending the data bits in its trans - mit shift register (8). when receive fifo data in uarta is unloaded to match the lower threshold of rts delay (9), uarta re-asserts rtsa# (10), ctsb# recognizes the change (11) and restarts its transmitter and data flow again until next receive fifo trigger (12). this same event applies to the reverse direction when uarta sends data to uartb with rtsb# and ctsa# controlling the data flow. rtsa# ctsb# rxa txb transmitter receiver fifo trigger reached auto rts trigger level auto cts monitor rtsa# txb rxa fifo ctsb# remote uart uartb local uart uarta on off on suspend restart rts high threshold data starts on off on assert rts# to begin transmission 1 2 3 4 5 6 7 receive data rts low threshold 9 10 11 receiver fifo trigger reached auto rts trigger level transmitter auto cts monitor rtsb# ctsa# rxb txa inta (rxa fifo interrupt) rx fifo trigger level rx fifo trigger level 8 12 rtscts1
xr16l788 xr high performance 2.97v to 5.5v octal uart rev. 1.2.2 16 2.11 auto xon/xoff (software) flow control when software flow control is enabled ( see table 18 ), the 788 compares one or two sequential receive data characters with the programmed xon or xoff-1,2 charac ter value(s). if receive character(s) (rx) match the programmed values, the 788 will halt tr ansmission (tx) as soon as th e current characte r has completed transmission. when a match occurs, the xoff (if enabled vi a ier bit-5) flag will be set and the interrupt output pin will be activated. following a su spension due to a match of the xoff character, the 788 will monitor the receive data stream for a match to the xon-1,2 character. if a match is found, the 788 will resume operation and clear the flags (isr bit-4). reset initially sets the contents of the xon/xoff 8-bit flow control registers to a logic 0. following reset, any desired xon/xoff value can be used for so ftware flow control. different condit ions can be set to detect xon/xoff characters ( see table 18 ) and suspend/resume transmissions. when double 8-bit xon/xoff characters are selected, the 788 compares two consec utive receive characters with two software flow control 8-bit values (xon1, xon2, xoff1, xoff2) and controls tx transmissi ons accordingly. under the above described flow control mechanisms, flow control characters are not placed (sta cked) in the user accessible rx data buffer or fifo. in the event that the receive buffer is overfilling and flow control needs to be executed, the 788 automatically sends an xoff message (when enabled) via the serial tx output to the remote modem. the 788 sends the xoff- 1,2 characters two character times (= time taken to send two characters at the programmed baud rate) after the receive fifo crosses the programmed trigger level (for all trigger tables a-d). to clear this condition, the 788 will transmit the programmed xon-1,2 characters as soon as receive fi fo is less than one trigger level below the programmed trigger le vel (for trigger tables a, b, and c) or when receive fifo is less than the trigger level minus the hysteresis value (for trigger tabl e d). this hysteresis value is the same as the auto rts/dtr hysteresis value in table 17 . table 6 below explains this when trigger table-b (see table 14 ) is selected. * after the trigger level is reached, an xoff character is se nt after a short span of time (= time required to send 2 characters); for example, after 2.083ms has el apsed for 9600 baud and 10-bit word length setting. 2.12 special character detect a special character detect feature is provided to detect an 8-bit character when bit-5 is set in the enhanced feature register (efr). when this character (xoff2) is detected, it will be placed in the fi fo along with normal incoming rx data. the 788 compares each inco ming receive character with xo ff-2 data. if a match exists, the received data will be transferred to fifo and is r bit-4 will be set to indicate detection of special character. al though the internal register table shows xon, xoff registers with eight bits of character information, the actual number of bits is dependent on the programmed word lengt h. line control register (lcr) bits 0-1 defines the number of character bits, i.e., either 5 bits, 6 bits, 7 bits, or 8 bits. the word length selected by lcr bits 0-1 also determines the number of bits that will be used for the special character comparison. bit-0 in the xon, xoff registers corresponds with the ls b bit for the receive character. 2.13 auto rs485 half-duplex control the auto rs485 half-duplex direction control changes the behavior of the transmitter when enabled by fctr bit-5. it asserts rts# or dtr# (low) after a specified delay indicate d in msr[7:4] following the last stop bit of the last character that has been transm itted. this helps in turning around the transceiver to receive the remote station?s response. the delay optimizes the time needed fo r the last transmission to reach the farthest station on a long cable network before switching off the li ne driver. this delay prevents undesirable line signal t able 6: a uto x on /x off (s oftware ) f low c ontrol rx t rigger l evel int p in a ctivation x off c haracter ( s ) s ent ( characters in rx fifo ) x on c haracter ( s ) s ent ( characters in rx fifo ) 8 8 8* 0 16 16 16* 8 24 24 24* 16 28 28 28* 24
xr xr16l788 rev. 1.2.2 high performance 2.97v to 5.5v octal uart 17 disturbance that causes sig nal degradation. when the ho st is ready to transmit ne xt polling data packet again, it only has to load data bytes to the transmit fifo. the transmitter automatically de-asserts rts# or dtr# output (high) prior to sending the data. the auto rs485 half-duplex direction control also changes the transmitter empty interrupt to tsr empty instead of thr empty. 2.14 infrared mode each uart in the 788 includes the infrared encoder and decoder compatible to the irda (infrared data association) version 1.0. the input pin enir conveniently activates all 8 uart channels to start up in the infrared mode. note that the enir pin is sampled when the rst# input is de-asserted. this global control pin enables the mcr bit-6 function in every uart channel re gister. after power up or a reset, the software can overwrite mcr bit-6 if so desired. enir and mcr bit- 6 also disable the receiver while the transmitter is sending data. this prevents echoed data from reaching the receiver. the global activation enir pin prevents the infrared emitter from turning on and drawing large amount of current while the system is starting up. when the infrared feature is enabled, the transmit data outputs, tx[7:0], would idle at logi c zero level. likewise, the rx [7:0] inputs assume an idle level of logic zero. the infrared encoder sends out a 3/16 of a bit wide high-pulse for each ?0? bit in the transmit data stream. this signal encoding reduces the on-time of the infr ared led, hence reduces the power consumption. see figure 11 below. the infrared decoder receives the input pulse from the in frared sensing diode on rx pin. each time it senses a light pulse, it returns a logic zero to the data bit st ream. the decoder also accepts (when fctr bit-4 = 1) an inverted ir-encoded input signal. this option supports active low instead of normal active high pulse from some infrared modules on the market. f igure 11. i nfrared t ransmit d ata e ncoding and r eceive d ata d ecoding character data bits start stop 0000 0 11 111 bit time 1/16 clock delay irdecoder - rx data receive ir pulse (rx pin) character data bits start stop 0000 0 11 111 tx data transmit ir pulse (tx pin) bit time 1/2 bit time 3/16 bit time irencoder-1
xr16l788 xr high performance 2.97v to 5.5v octal uart rev. 1.2.2 18 2.15 sleep mode with auto wake-up the 788 supports low voltage system designs, hence, a sleep mode is included to reduce its power consumption when the chip is not actively used. all of these conditions must be sati sfied for the 788 to enter sleep mode: no interrupts pending for all 8 channels of the 788 (isr bit-0 = 1) sleep register = 0xff modem inputs are not toggling (msr bits 0-3 = 0) rx input pin of all 8 channels are idling high the 788 stops its crystal oscillator to conserve power in the sl eep mode. user can che ck the xtal2 pin for no clock output as an indication that the device has entered the sleep mode. the 788 resumes normal operation by any of the following: a receive data start bit transition (high to low) a data byte is loaded to the transmitter, thr or fifo a change of logic state on any of the modem or general purpose serial inputs: cts#, dsr#, cd#, ri# if the 788 is awakened by any one of the above conditi ons, it will return to the sleep mode au tomatically after all interrupting conditions have been serviced and clea red. if the 788 is awakened by the modem inputs, a read to the msr is required to reset th e modem inputs. in any ca se, the sleep mode will not be entered while an interrupt is pending in any channel. also, a special in terrupt is generated with an indication of no pending interrupt. reading int0 will cl ear this special interrupt. the 788 will stay in the sleep mode of operation until it is disabled by setting sleep = 0x00. a word of caution: owing to the star ting up delay of the crystal oscillato r after waking up from sleep mode, the first few receive characters may be lost. the number of ch aracters lost during the restart also depends on your operating data rate. more characters are lost when operating at higher data rate.
xr xr16l788 rev. 1.2.2 high performance 2.97v to 5.5v octal uart 19 2.16 internal loopback each uart channel provides an in ternal loopback capabilit y for system diagnostic pu rposes. the internal loopback mode is enabled by setting mcr register bit-4 to logi c 1. all regular uart functions operate normally. figure 12 shows how the modem port signals are re-configured. transmit data from the transmit shift register output is internally routed to the receive shift register input allowing the system to re ceive the same data that it was sending. the tx pin is held at high or mark condition while rts# and dt r# are de-asserted (high), and cts#, dsr# cd# and ri# inputs are ignored. f igure 12. i nternal l oop b ack tx [7:0] rx [7:0] modem / general purpose control logic internal bus lines and control signals rts# [7:0] mcr bit-4=1 vcc vcc vcc transmit shift register receive shift register cts# [7:0] dtr# [7:0] dsr# [7:0] ri# [7:0] cd# [7:0] op1# op2# rts# cts# dtr# dsr# ri# cd#
xr16l788 xr high performance 2.97v to 5.5v octal uart rev. 1.2.2 20 3.0 xr16l788 registers the xr16l788 octal uart register set consists of the device configuration registers that are accessible directly from the data bus for programming general op erating conditions of the uarts and monitoring the status of various functions. these fu nctions include all 8 channel uart?s interrupt control and status, 16-bit general purpose timer control and status, sleep mode, soft -reset, and device identifi cation and revision. also, each uart channel has its own set of internal uart configuration registers for its own operation control, status reporting and data transfer. these registers ar e mapped into a 256-byte of the data memory address space. the following paragraphs describe all the registers in detail. 3.1 device configuration register set the device configuration registers are directly accessi ble from the bus. this provides easy programming of general operating parameters to the 788 uart and for mo nitoring the status of various functions. the device configuration registers are mapped onto address 0x80-8f as shown on the register map in table 8 and figure 13 . these registers provide global controls and stat us of all 8 channel uarts that include interrupt status, 16-bit general purpose timer c ontrol and status, 8x or 16x sampling clock, sleep mode control, soft- reset control, simultaneous ua rt initialization, and device identification and revision. f igure 13. t he xr16l788 r egisters t able 7: xr16l788 r egister s ets a ddress [a7:a0] uart c hannel s pace r eference c omment 0x00 - 0x0f uart channel 0 registers ( table 11 & 12) first 8 registers are 16550 compatible 0x10 - 0x1f uart channel 1 registers ( table 11 & 12) 0x20 - 0x2f uart channel 2 registers ( table 11 & 12) 0x30 - 0x3f uart channel 3 registers ( table 11 & 12) 0x40 - 0x4f uart channel 4 registers ( table 11 & 12) 0x50 - 0x5f uart channel 5 registers ( table 11 & 12) 0x60 - 0x6f uart channel 6 registers ( table 11 & 12) 0x70 - 0x7f uart channel 7 registers ( table 11 & 12) 0x80 - 0x8f device configuration registers ( table 8 ) interrupt registers and global controls int0, int1, int2, int3, timer, sleep, reset 8-bit data bus interface channel 0 channel 1 channel 2 channel 3 channel 4 channel 5 channel 6 channel 7 device configuration registers 8 channel interrupts, 16-bit timer/counter, sleep, reset, dvid, drev uart[7:0] configuration registers 16550 compatible and exar enhanced registers 758regs-1 0x10-1f 0x00-0f 0x20-2f 0x30-3f 0x40-4f 0x50-5f 0x60-6f 0x70-7f 0x80-8f
xr xr16l788 rev. 1.2.2 high performance 2.97v to 5.5v octal uart 21 t able 8: d evice c onfiguration r egisters a ddress [a7:a0] r ead / w rite r egister bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0x80 r int source uart 7 uart 6 uart 5 uart 4 uart 3 uart 2 uart 1 uart 0 0x81 r int 1 uart 2 bit 1 source bit 0 uart 1 bit 2 interrupt bit 1 source bit 0 uart 0 bit 2 interrupt bit 1 source bit 0 0x82 r int 2 uart 5 bit 0 uart 4 bit 2 interrupt bit 1 source bit 0 uart 3 bit 2 interrupt bit 1 source bit 0 uart 2 bit 2 0x83 r int 3 uart 7 bit 2 interrupt bit 1 source bit 0 uart 6 bit 2 interrupt bit 1 source bit 0 uart 5 bit 2 source bit 1 0x84 r/w timer ctrl 0 0 0 0 clock source function select start timer enable timer int 0x85 r timer 0 0 0 0 0 0 0 0 0x86 r/w timer lsb bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0x87 r/w timer msb bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0x88 r/w 8x mode uart 7 uart 6 uart 5 uart 4 uart 3 uart 2 uart 1 uart 0 0x89 r reg 1 0 0 0 0 0 0 0 0 0x8a w reset reset uart 7 reset uart 6 reset uart 5 reset uart 4 reset uart 3 reset uart 2 reset uart 1 reset uart 0 0x8b r/w sleep enable sleep uart 7 enable sleep uart 6 enable sleep uart 5 enable sleep uart 4 enable sleep uart 3 enable sleep uart 2 enable sleep uart 1 enable sleep uart 0 0x8c r drev bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0x8d r dvid bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0x8e r/w reg 2 0 0 0 0 0 0 0 write to all uarts
xr16l788 xr high performance 2.97v to 5.5v octal uart rev. 1.2.2 22 3.1.1 the global interrupt source registers the xr16l788 has a global interrupt source register set that consists of 4 consecutive registers [int0, int1, int2 and int3]. the four registers are in the device configuration register address space. all four registers default to logic zero (as indicated in square braces) for no interrupt pending. all 8 channel interrupts are enabled or disabled in each channel?s ier register. int0 shows individual status for each channel while int1, int2 and int3 show the details of the source of each channel?s interrupt with its unique 3- bit encoding. figure 14 shows the 4 interrupt registers in sequence for clarity. the 16-bit timer and sleep wake-up interrupts are masked in the device configuration registers, timercntl and sleep. an interrupt is generated by the 788 when awakened from sleep if all 8 channels were placed in the sleep mode previously. reading int0 will clear th is wake-up interrupt. each bit gives an indication of the channel that has requested for service. for example, bit-0 represents channel 0 and bit-7 indicates channel 7. logic one indicates the channel n [7:0] has called for service. the interrupt bit clears after reading the appropriate register of the interrupting uart channel register (isr, lsr and msr). see table 13 for interrupt clearing details. 3.1.1.1 int0 channel interrupt indicator: 3.1.1.2 int1, int2 and int3 interrupt source locator int3, int2 and int1 provide a 24-bit (3 bits per channel) encoded interrupt indicator. table 9 shows the 3 bit encoding and their priority or der. the 16-bit timer time-out interrupt will show up only as a channel 0 interrupt. for other channels, interrupt 7 is reserved. . int3 [0x00] int2 [0x00] int1 [0x00] int0 [0x00] f igure 14. t he g lobal i nterrupt r egisters , int0, int1, int2 and int3 int0 register individual uart channel interrupt status ch-7 ch-6 ch-5 ch-4 ch-3 ch-2 ch-1 ch-0 bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 channel-7 channel-6 channel-5 channel-4 channel-3 channel-2 channel-1 channel-0 int2 register int1 register int3 register interrupt registers, int0, int1, int2 and int3 bit 1 bit 2 bit 0 bit 1 bit 2 bit 0 bit 1 bit 2 bit 0 bit 1 bit 2 bit 0 bit 1 bit 2 bit 0 bit 1 bit 2 bit 0 bit 1 bit 2 bit 0 bit 1 bit 2 bit 0 int0 register bit-0 bit-1 bit-2 bit-3 bit-7 bit-4 bit-5 bit-6 ch-6 ch-7 ch-5 ch-4 ch-1 ch-0 ch-3 ch-2
xr xr16l788 rev. 1.2.2 high performance 2.97v to 5.5v octal uart 23 3.1.2 general purpose 16-bit timer/counter [timermsb, ti melsb, timer, timecntl] ( default 0 x xx-xx-00-00) a 16-bit down-count timer for general purpose timer or counter. its clock source may be selected from internal crystal oscillator or externa lly on pin tmrck. the timer can be set to be a single-shot fo r a one-time event or re-triggerable for a periodic event. an interrupt may be generated in the int register when the timer times out. it is controlled through 4 configuration registers [timercntl, timer, timelsb, timermsb]. th ese registers provide start/stop and re-triggerable or one-shot operation. the time-out output of the timer can be set to generate an interrupt for system or event alarm. t able 9: uart c hannel [7:0] i nterrupt s ource e ncoding and c learing p riority bit 2 bit 1 bit 0 i nterrupt s ource ( s ) and c learing x 0 0 0 none 1 0 0 1 rxrdy & rx line status (logic or of lsr[4:1]). rxrdy int clea rs by reading data in the rx fifo until it falls below the trigger level; rx li ne status int cleared after reading lsr register. 2 0 1 0 rxrdy time-out: cleared same way as rxrdy int. 3 0 1 1 txrdy, thr or tsr (auto rs485 mode) empty, clears after reading isr register. 4 1 0 0 msr, rts/cts or dtr/dsr delta or xoff/xon or special character detected. the first two clears after reading msr register; xoff/xon or special char. detect int clears after reading isr register. 5 1 0 1 reserved. 6 1 1 0 reserved. 7 1 1 1 timer time-out, shows up as a channel 0 int. it clears after reading the timercntl register. reserved in other channels. f igure 15. t imer /c ounter circuit tmrck osc. clock timercntl [3] 16-bit timer/counter timercntl [2] re-trigger single-shot timercntl [1] start/stop timercntl [0] timer interrupt, ch-0 int=7 time-out timer interrupt enable single/re-triggerable timermsb and timerlsb (16-bit value) 0 1 0 1 0 1 no interrupt clock select
xr16l788 xr high performance 2.97v to 5.5v octal uart rev. 1.2.2 24 3.1.2.1 timer [7:0] (default 0x00): reserved. 3.1.2.2 timermsb [7:0] and timerlsb [7:0] timermsb and timerlsb form a 16-bit value. the least-significant bit of the timer is being bit [0] of the timerlsb with most-significant-bit be ing bit [7] in timermsb. reading the timercntl register will clear its interrupt. default value is zero upon power-up and reset. 3.1.3 8xmode [7:0] (default 0x00) each bit selects 8x or 16x sampling rate for that uart channel, bit-0 is channel 0. logic 0 (default) selects normal 16x sampling with logic one se lects 8x sampling rate. transmit and receive data rates will double by selecting 8x. 3.1.4 rega [15:8] (default 0x00) reserved. t able 10: timer control r egister timercntl [0] logic zero (default) disables timer-counter interr upt and logic one enables the interrupt, reading the timercntl clears the interrupt. timercntl [1] logic zero (default) stops/pauses the timer a nd logic one starts/re-starts the timer/counter. timercntl [2] logic zero (default) selects re-tri gger timer function and logic one selects one-shot (timer function. timercntl [3] logic zero (default) selects internal and logic one selects external clock to the timer/counter. timercntl [7:4] reserved (defaults to zero). timercntl register rsvd rsvd rsvd rsvd clock select single/ re-trigger start/ stop int enable bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 timermsb register bit-15 bit-14 bit-13 bit-12 bit-11 bit-10 bit-9 bit-8 timerlsb register bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 16-bit timer/counter programmable registers ch-6 ch-7 ch-5 ch-4 ch-3 ch-2 ch-1 ch-0 8xmode register individual uart channel 8x clock mode enabl e bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0
xr xr16l788 rev. 1.2.2 high performance 2.97v to 5.5v octal uart 25 3.1.5 reset [7:0] (default 0x00) the 8-bit reset register provides the software with the ability to reset the uart (s) when there is a need. each bit is self-resetting after it is written a logic 1 to perform a reset to that channel. all registers in that channel will be reset to th e default condition, see table 19 for details. as an example, bit-0 =1 resets uart channel 0 with bit-7=1 resets channel 7. 3.1.6 sleep [7:0] (default 0x00) the 8-bit sleep register enables each uart separately to enter sleep mode. sleep mode reduces power consumption when the system needs to put the uart(s) to idle. the uart enters sleep mode when there is no interrupt pending. when all 8 uart s are put to sleep, the on-chip osc illator shuts off to further conserve power. in this case, the octal uart is awaken by any of the uart channel on from a receive data byte or a change on the serial port. the uart is ready after 32 crystal clocks to ensure full functiona lity. also, a special interrupt is generated with an indication of no pendin g interrupt. logic 0 (default) and logic 1 disable and enable sleep mode respectively. 3.1.7 device identification and revision there are 2 internal registers that provide device iden tification and revision, dvid and drev registers. the 8- bit content in the dvid register provides device identifica tion. a return value of 0x28 from this register indicates the device is a xr16l788. the drev register returns a 8-bi t value of 0x01 for revision a, 0x02 for revision b and so on. this information is very useful to the softwa re driver for identifying whic h device it is communicating with and to keep up with revision changes. 3.1.7.1 dvid [7:0] (default 0x28) device identification for the type of uart. the upper ni bble indicates it is a xr16l78x series with lower nibble indicating the number of channels. examples: xr16l788 = 0x28 xr16l784 = 0x24 3.1.7.2 drev [7:0] (default (0x01) revision number of the xr16l788. a 0x01 represents "revision-a" with 0x02 for rev-b and so forth. ch-6 ch-7 ch-5 ch-4 ch-3 ch-2 ch-1 ch-0 reset register individual uart channel reset enable bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 ch-6 ch-7 ch-5 ch-4 ch-3 ch-2 ch-1 ch-0 bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 sleep register individual uart channel sleep enable
xr16l788 xr high performance 2.97v to 5.5v octal uart rev. 1.2.2 26 3.1.8 regb [7:0] (default 0x00) regb[0]: simultaneous write to all 8 uarts ? logic 0 = write to each uart configuration register individually (default). ? logic 1 = enable simultaneous write to all 8 uart config uration registers. this can be very useful during device initialization in the power-up and reset routines. regb[7:1] reserved.
xr xr16l788 rev. 1.2.2 high performance 2.97v to 5.5v octal uart 27 3.2 uart channel configuration registers the first 8 registers are 16550 compatible with exar enhanced feature registers located on the upper 8 addresses. the 8 sets of uart configuration registers are decoded using address lines a0 to a3 as shown below. . t able 11: uart channel configuration registers a ddress r egister r ead /w rite c omments a3 a2 a1 a0 16550 c ompatible r egisters 0 0 0 0 rhr - receive holding register read-only lcr[7] = 0 0 0 0 0 thr - transmit holding register write-only lcr[7] = 0 0 0 0 0 dll - div latch low read/write lcr[7] = 1 0 0 0 1 dlm - div latch high read/write lcr[7] = 1 0 0 0 1 ier - interrupt enable register read/write lcr[7] = 0 0 0 1 0 isr - interrupt status register read-only 0 0 1 0 fcr - fifo control register write-only 0 0 1 1 lcr - line control register read/write 0 1 0 0 mcr - modem control register read/write 0 1 0 1 lsr - line status register read-only 0 1 1 0 msr - modem status register read-only 0 1 1 0 rs485 turn-around delay register write-only 0 1 1 1 spr - scratch pad register read/write e nhanced r egisters 1 0 0 0 fctr - feature control register read/write 1 0 0 1 efr - enhanced function register read/write 1 0 1 0 txcnt - transmit fifo level counter read-only 1 0 1 0 txtrg - transmit fifo trigger level write-only 1 0 1 1 rxcnt - receive fifo level counter read-only 1 0 1 1 rxtrg - receive fifo trigger level write-only 1 1 0 0 xoff-1 - xoff character 1 write-only 1 1 0 0 xchar read-only xon,xoff rcvd. flags 1 1 0 1 xoff-2 - xoff character 2 write-only 1 1 1 0 xon-1 - xon character 1 write-only 1 1 1 1 xon-2 - xon character 2 write-only
xr16l788 xr high performance 2.97v to 5.5v octal uart rev. 1.2.2 28 t able 12: uart channel configurati on registers description. s haded bits are enabled by efr b it -4. a ddress a3-a0 r eg n ame r ead / w rite b it -7 b it -6 b it -5 b it -4 b it -3 b it -2 b it -1 b it -0 c omment 0 0 0 0 rhr r bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 lcr[7]=0 0 0 0 0 thr w bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 lcr[7]=0 0 0 0 0 dll r/w bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 lcr[7]=1 0 0 0 1 dlm r/w bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 lcr[7]=1 0 0 0 1 ier r/w 0 0 0 0 modem status int. enable rx line status int. enable tx empty int. enable rx data int. enable cts/ dsr# int. enable rts/ dtr# int. enable xon/xoff/ sp. char. int. enable 0 0 1 0 isr r fifos enable fifos enable 0 0 int source bit-3 int source bit-2 int source bit-1 int source bit-0 delta - flow cntl xoff/spe - cial char 0 0 1 0 fcr w rx fifo trigger rx fifo trigger tx fifo trigger tx fifo trigger dma mode tx fifo reset rx fifo reset fifos enable 0 0 1 1 lcr r/w divisor enable set tx break set par - ity even parity parity enable stop bits word length bit-1 word length bit-0 0 1 0 0 mcr r/w 0 0 0 internal lopback enable op2 2 op1 2 rts# pin con - trol dtr# pin con - trol brg pres - caler ir enable xonany rts/ dtr flow sel 0 1 0 1 lsr r/w rx fifo e rror tsr empty thr empty rx break rx framing error rx par - ity error rx overrun rx data ready 0 1 1 0 msr r cd ri dsr cts delta cd# delta ri# delta dsr# delta cts# msr w rs485 dly-3 rs485 dly-2 rs485 dly-1 rs485 dly-0 0 0 0 0 0 1 1 1 spr r/w bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 user data 1 0 0 0 fctr r/w trg ta b l e bit-1 trg ta b l e bit-0 auto rs485 enable invert ir rx input rts/ dtr hyst bit- 3 rts/ dtr hyst bit- 2 rts/ dtr hyst bit- 1 rts/ dtr hyst bit- 0 1 0 0 1 efr r/w auto cts/ dsr enable auto rts/ dtr enable special char select enable ier [7:4], isr [5:4], fcr[5:4], mcr[7:5] msr[7:4] soft - ware flow cntl bit-3 soft - ware flow cntl bit-2 soft - ware flow cntl bit-1 soft - ware flow cntl bit-0 1 0 1 0 txcnt r bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 1 0 1 0 txtrg w bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0
xr xr16l788 rev. 1.2.2 high performance 2.97v to 5.5v octal uart 29 n ote 2: mcr bits 2 and 3 (op1 and op2 outputs) are not availa ble in the xr16l788. they are present for 16c550 com - patibility during internal loopback, see figure 12 . 4.0 internal register descriptions 4.1 receive holding register (rhr) - read only see?receiver? on page 11. 4.2 transmit holding register (thr) - write only see?transmitter? on page 10. 4.3 interrupt enable register (ier) - read/write the interrupt enable register (ier) masks the interrupts from receive data ready, transmit empty, line status and modem status registers. these inte rrupts are reported in the interrupt status register (isr) register and also encoded in int (int0-int3) register in the device configuration registers. 4.3.1 ier versus receive fifo interrupt mode operation when the receive fifo (fcr bit-0 = a logic 1) and rece ive interrupts (ier bit-0 = logic 1) are enabled, the rhr interrupts (see isr bits 3 and 4) status will reflect the following: a. the receive data available interrupts are issued to the host when the fifo has reached the programmed trigger level. it will be cleared when the fifo drops below the programmed trigger level. b. fifo level will be reflected in the isr register when the fifo trigger level is reached. both the isr register status bit and the interrupt will be cleared wh en the fifo drops below the trigger level. c. the receive data ready bit (lsr bit-0) is set as soon as a character is transferred from the shift register to the receive fifo. it is rese t when the fifo is empty. 4.3.2 ier versus receive/transmit fifo polled mode operation when fcr bit-0 equals a logic 1 for fifo enable; resetting ier bits 0-3 enables the xr16l788 in the fifo polled mode of operation. since the receiver and transmitter have separate bits in the lsr either or both can be used in the polled mode by selecting respective transmit or receive control bit(s). a. lsr bit-0 indicates there is data in rhr or rx fifo. b. lsr bit-1 indicates an overrun error has occurred and that data in the fifo may not be valid. c. lsr bit 2-4 provides the type of receive data erro rs encountered for the data byte in rhr, if any. d. lsr bit-5 indicates thr is empty. e. lsr bit-6 indicates when both the transmit fifo and tsr are empty. f. lsr bit-7 indicates a data error in at least one character in the rx fifo. 1 0 1 1 rxcnt r bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 1 0 1 1 rxtrg w bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 1 1 0 0 xchar r 0 0 0 0 0 0 xon det. indicator xoff det. indicator self-clear after read 1 1 0 0 xoff1 w bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 1 1 0 1 xoff2 w bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 1 1 1 0 xon1 w bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 1 1 1 1 xon2 w bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 t able 12: uart channel configurati on registers description. s haded bits are enabled by efr b it -4. a ddress a3-a0 r eg n ame r ead / w rite b it -7 b it -6 b it -5 b it -4 b it -3 b it -2 b it -1 b it -0 c omment
xr16l788 xr high performance 2.97v to 5.5v octal uart rev. 1.2.2 30 ier[0]: rhr interrupt enable the receive data ready interrupt will be issued when rhr has a data character in th e non-fifo mode or when the receive fifo has reached the programmed trigger level in the fifo mode. ? logic 0 = disable the receive data ready interrupt (default). ? logic 1 = enable the receiver data ready interrupt. ier[1]: thr interrupt enable this interrupt is associated with bit- 5 in the lsr register. an interrupt is issued whenever the thr becomes empty or when data in the tx fifo falls below the programmed trigger level. ? logic 0 = disable transmit holding re gister empty interrupt (default). ? logic 1 = enable transmit holding register empty interrupt. ier[2]: receive line status interrupt enable if any of the lsr register bits 1, 2, 3 or 4 is a logic 1, it will generate an interrupt to inform the host controller about the error status of the current data byte in fifo . lsr bits 1-4 generate an interrupt immediately when the character has been received. ? logic 0 = disable the receiver line status interrupt (default). ? logic 1 = enable the receiver line status interrupt. ier[3]: modem status interrupt enable ? logic 0 = disable the modem status register interrupt (default). ? logic 1 = enable the modem status register interrupt. ier[4]: reserved . ier[5]: xoff interrupt enable (requires efr bit-4=1) ? logic 0 = disable the software flow cont rol, receive xoff interrupt (default). ? logic 1 = enable the software flow control, receive xo ff interrupt. see software flow control section for details. ier[6]: rts# output interrupt enable (requires efr bit-4=1) ? logic 0 = disable the rts# interrupt (default). ? logic 1 = enable the rts# interrupt. the uart issues an interrupt when the rts# pin makes a transition. ier[7]: cts# input interrupt enable (requires efr bit-4=1) ? logic 0 = disable the cts# interrupt (default). ? logic 1 = enable the cts# interrupt. the uart issues an interrupt when cts# pin makes a transition. 4.4 interrupt status register (isr) - read only the uart provides multiple levels of prioritized interrupts to minimize external software interaction. the interrupt status register (isr) provides the user with six interrupt status bits. performing a read cycle on the isr will give the user the current highe st pending interrupt level to be serviced, others queue up for next service. no other interrupts are acknowledged until the pending interrupt is serviced. the interrupt source ta b l e , table 13 , shows the data values (bit 0-5) for the six prioritized interrupt levels and the interrupt sources associated with each of these interrupt levels.
xr xr16l788 rev. 1.2.2 high performance 2.97v to 5.5v octal uart 31 4.4.1 interrupt generation: ? lsr is by any of the lsr bits 1, 2, 3 and 4. ? rxrdy is by rx trigger level. ? rxrdy time-out is by a 4-char plus 12 bits delay timer. ? txrdy is by tx trigger level or tx fifo empty (or transmitter empty in auto rs-485 control). ? msr is by any of the msr bits 0, 1, 2 and 3. ? receive xoff/special character is by det ection of a xoff or special character. ? cts#/dsr# is when its transmitter toggles the input pin (from low to high) during auto cts/dsr flow control enabled by efr bit-7 and selection on mcr bit-2. ? rts#/dtr# is when its receiver toggles the output pin (from low to high) during auto rts/dtr flow control enabled by efr bit-6 and selection on mcr bit-2. 4.4.2 interrupt clearing: ? lsr interrupt is cleared by a read to the lsr register. ? rxrdy interrupt is cleared by reading data until fifo fa lls below the trigger level. ? rxrdy time-out interrupt is cleared by reading rhr. ? txrdy interrupt is cleared by a read to the isr register or writing to thr. ? msr interrupt is cleared by a read to the msr register. ? xoff interrupt is cleared by a read to isr or when xon character(s) is received. ? special character interrupt is cleared by a read to isr or after the next character is received. ? rts#/dtr# and cts#/dsr# status change interrupts are cleared by a read to the msr register. ] isr[0]: interrupt status ? logic 0 = an interrupt is pending and the isr contents ma y be used as a pointer to the appropriate interrupt service routine. ? logic 1 = no interrupt pending. (default condition) isr[5:1]: interrupt status these bits indicate the source for a pending interrupt at interrupt priority levels (see table 13 ). see ?section 4.4.1, interrupt generation:? on page 31 and ?section 4.4.2, interrupt clearing:? on page 31 for details. t able 13: i nterrupt s ource and p riority l evel p riority isr r egister s tatus b its s ource of the interrupt + l evel b it -5 b it -4 b it -3 b it -2 b it -1 b it -0 1 0 0 0 1 1 0 lsr (receiver line status register) 2 0 0 0 1 0 0 rxrdy (received data ready) 3 0 0 1 1 0 0 rxrdy (receive data time-out) 4 0 0 0 0 1 0 txrdy (transmitter holding register empty) 5 0 0 0 0 0 0 msr (modem status register) 6 0 1 0 0 0 0 rxrdy (received xon/xoff or special character) 7 1 0 0 0 0 0 cts#/dsr#, rts#/dtr# change of state x 0 0 0 0 0 1 none (default)
xr16l788 xr high performance 2.97v to 5.5v octal uart rev. 1.2.2 32 isr[7:6]: fifo enable status these bits are set to a logic 0 when the fifos are disa bled. they are set to a logic 1 when the fifos are enabled. 4.5 fifo control register (fcr) - write only this register is used to enable the fifos, clear the fi fos, set the transmit/receive fifo trigger levels, and select the dma mode. the dma, and fifo modes are defined as follows: fcr[0]: tx and rx fifo enable ? logic 0 = disable the transmit and receive fifo (default). ? logic 1 = enable the transmit and receive fifos. this bit must be set to logic 1 when other fcr bits are written or they will not be programmed. fcr[1]: rx fifo reset this bit is only active when fcr bit-0 is active. ? logic 0 = no receive fifo reset (default). ? logic 1 = reset the receive fifo pointers and fifo le vel counter logic (the rece ive shift register is not cleared or altered). this bit will return to a logic 0 after resetting the fifo. fcr[2]: tx fifo reset this bit is only active when fcr bit-0 is active. ? logic 0 = no transmit fifo reset (default). ? logic 1 = reset the transmit fifo pointers and fifo le vel counter logic (the transmit shift register is not cleared or altered). this bit will return to a logic 0 after resetting the fifo. fcr[3]: dma mode select this bit has no effect since txrdy and rxrdy pins are no t available in this device. it is provided for legacy software. ? logic 0 = set dma to mode 0 (default). ? logic 1 = set dma to mode 1. fcr[5:4]: transmit fifo trigger select (logic 0 = default, tx trigger level = one) the fctr bits 6-7 are associated with these 2 bits by selecting one of the four tables. the 4 user selectable trigger levels in 4 tables are sup ported for compatibility reasons. these 2 bits set the trigger level for the transmit fifo interrup t. the uart will issue a transmit interrupt when the number of char acters in the fifo falls below the selected trigger level, or when it gets empty in case that the fifo did not get filled over the trigger level on last re-load. table 14 below shows the selections. fcr[7:6]: receive fifo trigger select (logic 0 = default, rx trigger level =1) the fctr bits 5-4 are associated with these 2 bits. these 2 bits are used to set the trigger level for the receive fifo. the uart will issue a receive in terrupt when the number of the char acters in the fifo crosses the trigger level. table 14 shows the complete selections . note that the receiver and the transmitter cannot use different trigger tables. whichever selection is made last applies to both the rx and tx side.
xr xr16l788 rev. 1.2.2 high performance 2.97v to 5.5v octal uart 33 4.6 line control register (lcr) - read/write the line control register is used to specify the asynchronous data communication format. the word or character length, the number of stop bits, and the parity are selected by writing the appropriate bits in this register. lcr[1:0]: tx and rx word length select these two bits specify the word length to be transmitted or received. t able 14: t ransmit and r eceive fifo t rigger t able and l evel s election t rigger t able fctr b it -7 fctr b it -6 fcr b it -7 fcr b it -6 fcr b it -5 fcr bit -4 r eceive t rigger l evel t ransmit t rigger l evel c ompatibility table-a 0 0 0 0 1 1 0 1 0 1 0 0 1 (default) 4 8 14 1 (default) 16c550, 16c2550, 16c2552, 16c554, 16c580 table-b 0 1 0 0 1 1 0 1 0 1 0 0 1 1 0 1 0 1 8 16 24 28 16 8 24 30 16c650a table-c 1 0 0 0 1 1 0 1 0 1 0 0 1 1 0 1 0 1 8 16 56 60 8 16 32 56 16c654 table-d 1 1 x x x x programmable via rxtrg register. programmable via txtrg register. 16l2752, 16l2750, 16c2852, 16c850, 16c854, 16c864 bit-1 bit-0 w ord length 0 0 5 (default) 0 1 6 1 0 7 1 1 8
xr16l788 xr high performance 2.97v to 5.5v octal uart rev. 1.2.2 34 lcr[2]: tx and rx stop-bit length select the length of stop bit is specified by this bi t in conjunction with the programmed word length. lcr[3]: tx and rx parity select parity or no parity can be selected via this bit. the pa rity bit is a simple way used in communications for data integrity check. see table 15 for parity selection summary below. ? logic 0 = no parity. ? logic 1 = a parity bit is generated during the transmissi on while the receiver checks for parity error of the data character received. lcr[4]: tx and rx parity select if the parity bit is enabled with lcr bit-3 set to a logi c 1, lcr bit-4 selects the even or odd parity format. ? logic 0 = odd parity is generated by forcing an odd number of logic 1?s in the transmitted character. the receiver must be programmed to check the same format (default). ? logic 1 = even parity is gene rated by forcing an even th e number of logic 1?s in the transmitted character. the receiver must be programmed to check the same format. lcr[5]: tx and rx parity select if the parity bit is enabled, lcr bit- 5 selects the forced parity format. ? lcr bit-5 = logic 0, parity is not forced (default). ? lcr bit-5 = logic 1 and lcr bit-4 = logic 0, parity bit is forced to a logical 1 for the transmit and receive data. ? lcr bit-5 = logic 1 and lcr bit-4 = logic 1, parity bit is forced to a logical 0 for the transmit and receive data. lcr[6]: transmit break enable when enabled the break control bit causes a break condition to be transmitted (the tx output is forced to a ?space?, logic 0, state). this co ndition remains until disabled by setting lcr bit-6 to a logic 0. ? logic 0 = no tx break condition. (default) ? logic 1 = forces the transmitter output (tx) to a ?space ?, logic 0, for alerting the remote receiver of a line break condition. bit-2 w ord length s top bit length (b it time ( s )) 0 5,6,7,8 1 (default) 1 5 1-1/2 1 6,7,8 2 t able 15: p arity selection lcr b it -5 lcr b it -4 lcr b it -3 p arity selection x x 0 no parity 0 0 1 odd parity 0 1 1 even parity 1 0 1 force parity to mark, ?1? 1 1 1 forced parity to space, ?0?
xr xr16l788 rev. 1.2.2 high performance 2.97v to 5.5v octal uart 35 lcr[7]: baud rate divisors enable baud rate generator divisor (dll/dlm) enable. ? logic 0 = data registers are selected (default). ? logic 1 = divisor latch registers are selected. 4.7 modem control regist er (mcr) - read/write the mcr register is used for cont rolling the modem interface signals or general purpose inputs/outputs. mcr[0]: dtr# output the dtr# pin may be used for automatic hardware flow control enabled by efr bit-6 and mcr bit-2=1. if the modem interface is not used, this output may be used for general purpose. ? logic 0 = force dtr# output to a logic 1 (default). ? logic 1 = force dtr# output to a logic 0. mcr[1]: rts# output the rts# pin may be used for automatic hardware flow control by enabled by efr bit-6 and mcr bit-2=0. if the modem interface is not used, this output may be used for general purpose. ? logic 0 = force rts# output to a logic 1 (default). ? logic 1 = force rts# output to a logic 0. mcr[2]: rts/cts or dtr/ds r for auto flow control dtr# or rts# auto hardware flow control select. this bi t is in effect only when auto rts/dtr is enabled by efr bit-6. ? logic 0 = rts# (rx side) and cts# (tx side) pins are used for auto hardware flow control (default). ? logic 1 = dtr# (rx side) and dsr# (tx side) pins are used for auto hardware flow control. mcr[3]: reserved mcr[4]: internal loopback enable ? logic 0 = disable loopback mode (default). ? logic 1 = enable local loopback mode, see loopback section and figure 12 . mcr[5]: xon-any enable ? logic 0 = disable xon-any function (default). ? logic 1 = enable xon-any function. in this mode any rx character re ceived will enable xon, resume data transmission. mcr[6]: infrared encoder/decoder enable the state of this bit depends on the sampled logic level of pin enir during power up, following a hardware reset (rising edge of rst# input). afterward user can override this bit for desired operation. ? logic 0 = enable the standard modem receive and transmit character interface. ? logic 1 = enable infrared irda receive and transmit inputs/outputs. while in this mode, the tx/rx output/ input are routed to the in frared encoder/ decoder. the data input and output levels will confor m to the irda infrared interf ace requirement. as such, while in this mode the infrared tx ou tput will be a logic 0 during idle data conditions. fctr bit-4 may be selected to invert the rx input signal level going to the decoder for infrared modules that provide rather an inverted output. mcr[7]: clock prescaler select ? logic 0 = divide by one. the input clock from the crystal or external clock is fed directly to the programmable baud rate generator without further modification, i.e., divide by one (default). ? logic 1 = divide by four. the prescaler divides the input clock from the crystal or external clock by four and feeds it to the programmable baud rate generator, hence, data rates become one forth.
xr16l788 xr high performance 2.97v to 5.5v octal uart rev. 1.2.2 36 4.8 line status register (lsr) - read only this register provides the status of data transfers between the uart and the host. if ier bit-2 is set to a logic 1, an lsr interrupt will be generated immediately when any character in the rx fifo has an error (parity, framing, overrun, break). lsr[0]: receive data ready indicator ? logic 0 = no data in receive holding register or fifo (default). ? logic 1 = data has been received and is save d in the receive holding register or fifo. lsr[1]: receiver overrun flag ? logic 0 = no overrun error (default). ? logic 1 = overrun error. a data overrun error condition occurred in the receive shift register. this happens when additional data arrives while the fi fo is full. in this case the previous data in the receive shift register is overwritten. note that under this condition the data byte in the receive shift register is not transferred into the fifo, therefore the data in the fifo is not corrupted by the error. lsr[2]: receive data parity error flag ? logic 0 = no parity error (default). ? logic 1 = parity error. the receive character in rhr does not have correct pa rity information and is suspect. this error is associated with the char acter available for reading in rhr. lsr[3]: receive data framing error flag ? logic 0 = no framing error (default). ? logic 1 = framing error. the receive character did not hav e a valid stop bit(s). this error is associated with the character available for reading in rhr. lsr[4]: receive break flag ? logic 0 = no break condition (default). ? logic 1 = the receiver received a break signal (rx was a logic 0 for one character frame time). in the fifo mode, only one break character is loaded into the fifo. the break indication remains until the rx input returns to the idle condit ion, ?mark? or logic 1. lsr[5]: transmit holding register empty flag this bit is the transmit holding regi ster empty indicator. this bit indica tes that the transmitter is ready to accept a new character for transmission. in addition, this bit causes the uart to issue an interrupt to the host when the thr inte rrupt enable is set. the thr bit is set to a logic 1 when the last data byte is transferred from the transmit holding register to the transmit shift regist er. the bit is reset to logic 0 concurrently with the data loading to the transmit holding register by the host. in th e fifo mode this bit is set when the transmit fifo is empty; it is cleared when at least 1 byte is written to the transmit fifo. lsr[6]: transmit shift register empty flag this bit is the transmit shift register empty indicator. th is bit is set to a logic 1 whenever the transmitter goes idle. it is set to logic 0 whenever either the thr or tsr contains a data character. in the fifo mode this bit is set to one whenever the transmit fifo and transmit shift register are both empty. lsr[7]: receive fifo data error flag ? logic 0 = no fifo error (default). ? logic 1 = an indicator for the sum of all error bits in th e rx fifo. at least one parity error, framing error or break indication is in the fifo data. this bit cl ears when there is no more error(s) in the fifo. 4.9 modem status register (msr) - read only this register provides the current state of the modem interface signals, or othe r peripheral device that the uart is connected. lower four bits of this register are used to indicate the changed information. these bits are set to a logic 1 whenever a signal from the modem changes state. these bits may be used as general purpose inputs/outputs when they are not used with modem signals.
xr xr16l788 rev. 1.2.2 high performance 2.97v to 5.5v octal uart 37 msr[0]: delta cts# input flag ? logic 0 = no change on cts# input (default). ? logic 1 = the cts# input has changed state since the la st time it was monitored. a modem status interrupt will be generated if msr interr upt is enabled (ier bit-3. msr[1]: delta dsr# input flag ? logic 0 = no change on dsr# input (default). ? logic 1 = the dsr# input has changed state since the last time it was monitored. a modem status interrupt will be generated if msr interr upt is enabled (ier bit-3. msr[2]: delta ri# input flag ? logic 0 = no change on ri# input (default). ? logic 1 = the ri# input has changed from a logic 0 to a logic 1, ending of the ringi ng signal. a modem status interrupt will be ge nerated if msr in terrupt is enabled (ier bit-3. msr[3]: delta cd# input flag ? logic 0 = no change on cd# input (default). ? logic 1 = indicates that the cd# input has changed st ate since the last time it was monitored. a modem status interrupt will be generated if msr interrupt is enabled (ier bit-3. msr[4]: cts input status cts# pin may function as automatic hardware flow control signal input if it is enabled and selected by auto cts (efr bit-7) and rts/cts flow control select (m cr bit-2). auto cts flow control allows starting and stopping of local data transmission s based on the modem ct s# signal. a high on the cts# pin will stop uart transmitter as soon as th e current character has finished tr ansmission, and a low will resume data transmission. normally msr bit-4 bit is the complement of the cts# input. however in the loopback mode, this bit is equivalent to the rts# bit in the mcr register. the cts# input may be used as a general purpose input when the modem interface is not used. msr[5]: dsr input status this input may be used for auto dtr/ dsr flow control function, see auto hardware flow control section. normally this bit is the complement of the dsr# input. in the loopback mode, this bit is equivalent to the dtr# bit in the mcr register. the dsr# input may be used as a general purpose input when the modem interface is not used. msr[6]: ri input status normally this bit is the complement of the ri# input. in the loop back mode this bit is equivalent to bit-2 in the mcr register. the ri# input may be used as a general purpose input when the modem interface is not used. msr[7]: cd input status normally this bit is the complement of the cd# input. in the loopback mode this bit is equivalent to bit-3 in the mcr register. the cd# input may be used as a general purpose input when the modem interface is not used. 4.10 modem status register (msr) - write only the upper four bits 4-7 of this register sets the delay in number of bits time for the auto rs485 turn around from transmit to receive. msr [7:4] when auto rs485 feature is enabled (fctr bit-5=1) and rts# output is connected to the enable input of a rs-485 transceiver. these 4 bits select from 0 to 15 bit-time delay after the end of the last stop-bit of the last transmitted character. this delay controls when to change th e state of rts# output. this delay is very useful in long-cable networks. table 16 shows the selection. the bits are enabled by efr bit-4.
xr16l788 xr high performance 2.97v to 5.5v octal uart rev. 1.2.2 38 4.11 scratch pad register (spr) - read/write this is a 8-bit general purpose register for the user to store temporary data. the co ntent of this register is preserved during sleep mode but becomes 0xff (default) after a reset or a power off-on cycle. 4.12 feature control register (fctr) - read/write this register controls the uart enhanced functions that are not available on st16c554 or st16c654. fctr [3:0] - auto rts/dtr fl ow control hysteresis select these bits select the auto rts/dtr flow control hyster esis and only valid when tx and rx trigger table-d is selected (fctr bit-6 and 7 are set to logic 1). the rts/ dtr hysteresis is referenced to the rx fifo trigger level. after reset, these bits are set to logic 0 selectin g the next fifo trigger level for hardware flow control. table 17 below shows the 16 selectable hysteresis levels. t able 16: a uto rs485 h alf - duplex d irection c ontrol d elay from t ransmit - to -r eceive msr[7] msr[6] msr[5] msr[4] d elay in d ata b it ( s ) t ime 0 0 0 0 0 0 0 0 1 1 0 0 1 0 2 0 0 1 1 3 0 1 0 0 4 9 1 0 1 5 0 1 1 0 6 0 1 1 1 7 1 0 0 0 8 1 0 0 1 9 1 0 1 0 10 1 0 1 1 11 1 1 0 0 12 1 1 0 1 13 1 1 1 0 14 1 1 1 1 15
xr xr16l788 rev. 1.2.2 high performance 2.97v to 5.5v octal uart 39 fctr[4]: infrared rx input logic select ? logic 0 = select rx input as active hi gh encoded irda data, normal, (default). ? logic 1 = select rx input as active low encoded irda data, inverted. fctr[5]: auto rs485 enable auto rs485 half duplex control enable/disable. ? logic 0 = standard st16c550 mode. transmitter generates an interrupt when transmit holding register (thr) becomes empty. transmit shift regist er (tsr) may still be shifting data bit out. ? logic 1 = enable auto rs485 half duplex direction control. rts# output changes its logic level from high to low when finished sending the last stop bit of the last character out of the tsr register. it changes from low to high when a data byte is loaded into the thr or transmit fifo. the change to high occurs prior sending the start-bit. it also changes the transmitter inte rrupt from transmit holding to transmit shift register (tsr) empty. t able 17: 16 s electable h ysteresis l evels w hen t rigger t able -d is s elected fctr b it -3 fctr b it -2 fctr b it -1 fctr b it -0 rts/dtr h ysteresis ( characters ) 0 0 0 0 0 0 0 0 1 +/- 4 0 0 1 0 +/- 6 0 0 1 1 +/- 8 0 1 0 0 +/- 8 0 1 0 1 +/- 16 0 1 1 0 +/- 24 0 1 1 1 +/- 32 1 1 0 0 +/- 12 1 1 0 1 +/- 20 1 1 1 0 +/- 28 1 1 1 1 +/- 36 1 0 0 0 +/- 40 1 0 0 1 +/- 44 1 0 1 0 +/- 48 1 0 1 1 +/- 52
xr16l788 xr high performance 2.97v to 5.5v octal uart rev. 1.2.2 40 fctr[7:6]: tx and rx fifo trigger table select these 2 bits select the transmit and receive fifo trigger level table a, b, c or d. when table a, b, or c is selected the auto rts flow c ontrol trigger level is set to "next fifo trigger level" for compatibility to st16c550 and st16c650 series. rts/dtr# triggers on the next leve l of the rx fifo trigger level, in another word, one fifo level above and one fi fo level below. see in table 14 for complete selection with fcr bit 4-5 and fctr bit 6-7, i.e. if table c is used on th e receiver with rx fifo tr igger level set to 56 by tes, rts/dtr# output will de-assert at 60 and re-assert at 16. 4.13 enhanced feature register (efr) - read/write enhanced features are enabled or disabled using this register. bit 0-3 provide si ngle or dual consecutive character software flow control selection (see table 18 ). when the xon1 and xon2 and xoff1 and xoff2 modes are selected, the double 8-bit words are concatenated in to two sequential characters. caution: note that whenever changing the tx or rx flow control bits, always reset all bits back to logic 0 (disable) before programming a new setting. efr[3:0]: software flow control select combinations of software flow control can be selected by programming these bits. t able 18: s oftware f low c ontrol f unctions efr bit -3 c ont -3 efr bit -2 c ont -2 efr bit -1 c ont -1 efr bit -0 c ont -0 t ransmit and r eceive s oftware f low c ontrol 0 0 0 0 no tx and rx flow control (default and reset) 0 0 x x no transmit flow control 1 0 x x transmit xon1/xoff1 0 1 x x transmit xon2/xoff2 1 1 x x transmit xon1 and xon2/xoff1 and xoff2 x x 0 0 no receive flow control x x 1 0 receiver compares xon1/xoff1 x x 0 1 receiver compares xon2/xoff2 1 0 1 1 transmit xon1/ xoff1, receiver compares xon1 or xon2, xoff1 or xoff2 0 1 1 1 transmit xon2/xoff2, receiver compares xon1 or xon2, xoff1 or xoff2 1 1 1 1 transmit xon1 and xon2/xoff1 and xoff2, receiver compares xon1 and xon2/xoff1 and xoff2 0 0 1 1 no transmit flow control, receiver compares xon1 and xon2/xoff1 and xoff2
xr xr16l788 rev. 1.2.2 high performance 2.97v to 5.5v octal uart 41 efr[4]: enhanced function bits enable enhanced function control bit. this bit enables the functi ons in ier bits 4-7, isr bits 4-5, fcr bits 4-5, and mcr bits 5-7 to be modified. after modifying any enhanced bits, efr bit-4 can be set to a logic 0 to latch the new values. this feature prevents legacy software from altering or overwriting the enhanced functions once set. normally, it is recommended to leave it enabled, logic 1. ? logic 0 = modification disable/latch en hanced features. ier bits 4-7, isr bits 4-5, fcr bits 4-5, and mcr bits 5-7 are saved to retain the user settings. after a reset, the ier bits 4-7, isr bits 4-5, fcr bits 4-5, and mcr bits 5-7 are set to a logic 0 to be compatible with st16c554 mode (default). ? logic 1 = enables the enhanced functions. when this bit is set to a logic 1 all enhanced features are enabled. efr[5]: special character detect enable ? logic 0 = special character detect disabled (default). ? logic 1 = special character detect enabled. the ua rt compares each incomi ng receive character with data in xoff-2 register. if a match ex ists, the received data will be transferr ed to fifo and isr bit-4 will be set to indicate detection of the special character. bit-0 co rresponds with the lsb bit for the receive character. if flow control is set for co mparing xon1, xoff1 (efr [1 :0]=10) then flow control and special character work normally. however, if flow control is set for comparing xon2, xoff 2 (efr[1:0]=01) then flow control works normally, but xoff2 will not go to the fifo, and will ge nerate an xoff interrupt and a special character interrupt. efr[6]: auto rts or dtr flow control enable rts#/dtr# output may be used for hardware flow contro l by setting efr bit-6 to logic 1. when auto rts/ dtr is selected, an in terrupt will be gener ated when the receive fifo is f illed to the progra mmed trigger level and rts/dtr# will de-assert (high) at the next upper trigger or selected hysteresis level. rts/dtr# will re- assert (low) when fifo data falls below the next lower trigger or selected hysteres is level (see fctr bits 4- 7). the rts# or dtr# output must be asserted (low) before the auto rts/dtr can take effect. the selection for rts# or dtr# is through mcr bit-2. rts/dtr# pin will function as a gene ral purpose output when hardware flow control is disabled. ? logic 0 = automatic rts/dtr flow control is disabled (default). ? logic 1 = enable automatic rts/dtr flow control. efr[7]: auto cts flow control enable automatic cts or dsr flow control. ? logic 0 = automatic cts/dsr flow control is disabled (default). ? logic 1 = enable automatic cts/dsr flow control. transmission stops when cts/dsr# pin de-asserts (high). transmission resumes when ct s/dsr# pin is asserted (low). th e selection for cts# or dsr# is through mcr bit-2. 4.14 txcnt[7:0]: transmit fifo level counter - read only transmit fifo level byte count from 0x00 (zero) to 0x40 (64). this 8-bit register gives an indication of the number of characters in the transmit fifo. the fifo le vel byte count register is read only. the user can take advantage of the fifo level byte counter for faster data loading to the transmit fifo., which reduces cpu bandwidth requirements. 4.15 txtrg [7:0]: transmit fi fo trigger level - write only an 8-bit value written to this register sets the tx fifo trigger level from 0x00 (zero) to 0x40 (64). the tx fifo trigger level generates an interrupt whenever the data leve l in the transmit fifo falls below this preset trigger level.
xr16l788 xr high performance 2.97v to 5.5v octal uart rev. 1.2.2 42 4.16 rxcnt[7:0]: receive fifo level counter - read only receive fifo level byte count from 0x00 (zero) to 0x40 (64). it gives an indication of the number of characters in the receive fifo. the fifo level byte count register is read only. the user can take advantage of the fifo level byte counter for faster data unloading from the receiver fifo, which reduces cpu bandwidth requirements. 4.17 rxtrg[7:0]: receive fifo trigger level - write only an 8-bit value written to this register, sets the rx fifo trigger level from 0x00 (zero) to 0x40 (64). the rx fifo trigger level generates an interrupt whenever the receive fifo level rises to this preset trigger level.
xr xr16l788 rev. 1.2.2 high performance 2.97v to 5.5v octal uart 43 t able 19: uart reset conditions registers reset state dll bits 7-0 = 0xxx dlm bits 7-0 = 0xxx rhr bits 7-0 = 0xxx thr bits 7-0 = 0xxx ier bits 7-0 = 0x00 fcr bits 7-0 = 0x00 isr bits 7-0 = 0x01 lcr bits 7-0 = 0x00 mcr bits 7-0 = 0x00 lsr bits 7-0 = 0x60 msr bits 3-0 = logic 0 bits 7-4 = logic levels of the inputs spr bits 7-0 = 0xff fctr bits 7-0 = 0x00 efr bits 7-0 = 0x00 txcnt bits 7-0 = 0x00 txtrg bits 7-0 = 0x00 rxcnt bits 7-0 = 0x00 rxtrg bits 7-0 = 0x00 xchar bits 7-0 = 0x00 xon1 bits 7-0 = 0x00 xon2 bits 7-0 = 0x00 xoff1 bits 7-0 = 0x00 xoff2 bits 7-0 = 0x00 i/o signals reset state tx[ch-7:0] high irtx[ch-7:0] low rts#[ch-7:0] high dtr#[ch-7:0] high
xr16l788 xr high performance 2.97v to 5.5v octal uart rev. 1.2.2 44 absolute maximum ratings power supply range 7 volts voltage at any pin -0.5 to 7v operating temperature -40 o to +85 o c storage temperature -65 o to +150 o c package dissipation 500 mw thermal resistance (14x20x3.0mm 100-qfp) -ja = 34c/w , -jc = 9c/w electrical characteristics dc electrical characteristics ta=0 o to 70 o c (-40 o to +85 o c for industrial grade package ), v cc is 2.97v to 5.5v s ymbol p arameter 3.3v m in 3.3 max 5v m in 5v m ax u nits c onditions vilck clock input low level -0.3 0.6 -0.5 0.6 v vihck clock input high level 2.4 6 3.0 6 v vil input low voltage -0.3 0.7 -0.5 0.8 v vih input high voltage 2.0 2.4 v volck clock output (xtal2) low voltage 0.4 0.55 v i oh =6 ma vohck clock output (xtal2) high voltage 2.0 2.4 v i oh =-2 ma vol output low voltage see figure 16 voh output high voltage see figure 17 iil input low leakage current -10 -10 ua iih input high leakage current 10 10 ua cin input pin capacitance 5 5 pf icc power supply current 5 5 ma ext clock=2mhz a7-a0 at gnd, all inputs at vcc or gnd and outputs unloaded isleep sleep current 0.60 3 ma eight uarts asleep. a7-a0 at gnd, all inputs at vcc or gnd and outputs unloaded.
xr xr16l788 rev. 1.2.2 high performance 2.97v to 5.5v octal uart 45 . f igure 16. xr16l788 vol s ink c urrent c hart f igure 17. xr16l788 voh s ource c urrent c hart xr16l788 sink current 0 2 4 6 8 10 12 14 16 18 20 22 24 26 0.00 0.10 0.20 0.30 0.40 0.50 0.60 0.70 0.80 0.90 1.00 vol (v) iol (ma) vcc=5v vcc=3.3v xr16l788 source current 0 2 4 6 8 10 12 14 16 1.00 1.50 2.00 2.50 3.00 3.50 4.00 4.50 5.00 voh (v) ioh (ma) vcc=5v vcc=3.3v
xr16l788 xr high performance 2.97v to 5.5v octal uart rev. 1.2.2 46 ac electrical characteristics ta=0 o to 70 o c (-40 o to +85 o c for industrial grade package ), v cc is 2.97v to 5.5v, 70 p f l oad where applicable symbol p arameter 3.3v m in 3.3v m ax 5v m in 5v m ax u nits tc1,tc2 clock pulse period 10 8 ns tosc crystal frequency 16 24 mhz teck external clock frequency 33 50 mhz tas address setup (16 mode) 5 5 ns tah address hold (16 mode) 10 10 ns tcs chip select width (16 mode) 50 50 ns tdy delay between cs# active cycles (16 mode) 50 50 ns trd read strobe width (16 mode) 50 50 ns twr write strobe width (16 mode) 40 30 ns trdv read data valid (16 mode) 35 25 ns twds write data setup (16 mode) 15 10 ns trdh read data hold (16 mode) 15 10 ns twdh write data hold (16 mode) 15 10 ns tads address setup (68 mode) 10 5 ns tadh address hold (68 mode) 10 10 ns trws r/w# setup to cs# (68 mode) 10 10 ns trda read data access (68 mode) 35 25 ns trdh read data hold (68 mode) 15 10 ns twds write data setup (68 mode) 10 10 ns twdh write data hold (68 mode) 10 10 ns trwh cs# de-asserted to r/w# de-asserted (68 mode) 10 10 ns tcsl cs# width (68 mode) 50 40 ns tcsd cs# cycle delay (68 mode) 50 40 ns twdo delay from iow# to modem output 50 50 ns tmod delay to set interrupt from modem input 50 35 ns trsi delay to reset interrupt from ior# 50 35 ns tssi delay from stop to set interrupt 1 1 bclk trri delay from ior# to reset interrupt 45 40 ns tsi delay from stop to interrupt 45 40 ns twri delay from iow# to reset interrupt 45 40 ns trst reset pulse 40 40 ns bclk baud clock 16x or 8x of data rate hz
xr xr16l788 rev. 1.2.2 high performance 2.97v to 5.5v octal uart 47 f igure 18. 16 m ode (i ntel ) d ata b us r ead and w rite t iming 16read t as t rdh t ah t rd t rdv t dy t rdh t rdv t ah t as t cs valid address valid address valid data valid data a0-a7 cs# ior# d0-d7 16 mode (intel) data bus read timing 16write t as t wdh t ah t wr t wds t dy t wdh t wds t ah t as t cs valid address valid address valid data valid data a0-a7 cs# iow# d0-d7 16 mode (intel) data bus write timing
xr16l788 xr high performance 2.97v to 5.5v octal uart rev. 1.2.2 48 f igure 19. 68 m ode (m otorola ) d ata b us r ead and w rite t iming 68 mode (motorola) data bus read timing 68 mode (motorola) data bus write timing 68read t ads t rdh t adh t csl t rda t csd t rws valid address valid address valid data a0-a7 cs# r/w# d0-d7 t rwh 68write t ads t wdh t adh t csl t wds t csd t rws valid address valid address valid data a0-a7 cs# r/w# d0-d7 t rwh valid data valid data
xr xr16l788 rev. 1.2.2 high performance 2.97v to 5.5v octal uart 49 f igure 20. m odem i nput /o utput t iming f igure 21. r eceive i nterrupt t iming [n on -fifo m ode ] iow # rts# dtr# cd# cts# dsr# int ior# ri# t wdo t mod t mod t rsi t mod active active change of state change of state active active active change of state change of state change of state active active rx ior# int# d0:d7 start bit d0:d7 stop bit d0:d7 1 byte in rhr 1 byte in rhr 1 byte in rhr t rr t rr t rr (reading data out of rhr)
xr16l788 xr high performance 2.97v to 5.5v octal uart rev. 1.2.2 50 f igure 22. t ransmit i nterrupt t iming [n on -fifo m ode ] f igure 23. r eceive i nterrupt t iming [fifo m ode ] f igure 24. t ransmit i nterrupt t iming [fifo m ode ] tx io w # int#* d0:d7 start bit d0:d7 stop bit d0:d7 t wri t wri t wri *tx interrupt is cleared when the isr is read or when data is loaded into the thr. isr is read isr is read isr is read (loading data into th r) (unloading) ier[1] enabled rx ior# int# d0:d7 s rx fifo fills up to rx trigger level or rx data timeout rx fifo drops below rx trigger level d0:d7 s d0:d7 t d0:d7 s d0:d7 s t d0:d7 s t t d0:d7 s t start bit t rr t rri t ssi (reading data out of rx fifo) tx iow # int#* d0:d7 s d0:d7 t d0:d7 s d0:d7 s t d0:d7 s t t d0:d7 s t start bit stop bit (unloading) (loading data into fifo) last data byte transmitted tx fifo fills up to trigger level tx fifo drops below trigger level tx fifo empty t t s t si isr is read ier[1] enabled isr is read *tx interrupt is cleared when the isr is read or when tx fifo fills up to the trigger level. t wri
xr xr16l788 rev. 1.2.2 high performance 2.97v to 5.5v octal uart 51 package dimensions 80 51 50 31 130 81 100 d d1 e e1 b e a2 a1 a seating plane l c 100 lead plastic quad flat p (14 mm x 20 mm, qfp) rev. 2.00 note: the control dimension is the millimeter column 1.95 mm form inches millimeters min max min max 0.102 0.134 2.60 3.40 0.002 0.014 0.05 0.35 0.100 0.120 2.55 3.05 0.009 0.015 0.22 0.38 0.005 0.009 0.13 0.23 0.931 0.951 23.65 24.15 0.783 0.791 19.90 20.10 0.695 0.715 17.65 18.15 0.547 0.555 13.90 14.10 0.0256 bsc 0.65 bsc 0.026 0.037 0.65 0.95 0 7 0 7 symbol a a 1 a 2 b c d d 1 e e 1 e l
xr16l788 xr high performance 2.97v to 5.5v octal uart rev. 1.2.2 52 notice exar corporation reserves the right to make changes to the products contained in this publicat ion in order to improve design, performanc e or reliability. exar corp oration assumes no responsibility for the use of any circuits described herein, conveys no license under any patent or other right, and makes no representation that the circuits are free of patent infr ingement. charts and schedules contai ned here in are only for illustration purposes and may vary depending upon a user?s specific application. while the information in this publication has been carefully ch ecked; no responsibility, however , is assumed for inaccuracies. exar corporation does not re commend the use of any of its products in life suppo rt applications where the failure or malfunction of the product can reasonably be ex pected to cause failure of the life support system or to significantly affect its safety or effectiveness. products ar e not authorized for use in such applications unless exar corporation receives , in writing, assuranc es to its satisfaction that: (a) th e risk of injury or damage has been minimized; (b) th e user assumes all such ris ks; (c) potential liability of exar corporation is adequately protected under the circumstances. copyright 2005 exar corporation datasheet october 2005. send your uart technical inquiry with technical details to hotline: uarttechsupport@exar.com . reproduction, in part or whole, without the prior written consent of exar co rporation is prohibited. revision history revision description p1.0.0 preliminary p1.0.1 corrected figure 2 pin diagram on pins 16 to 30 and 39. p1.0.2 corrected pins description (pin number) for tx3, rx6, dsr6# and 16/68#. p1.0.3 changed part number to xr16l788, added 5v spec and target timing, and corrected rx6 pin to be 39. p1.0.4 changed icc to 5ma max. and isleep current to 400ua max, clarified enir pin and mcr bits 2 and 6. 1.1.0 updated electrical specification tables. added -ja and -jc values. removed preliminary designation. 1.1.1 changed v il ( 0.8 to 0.7 max) and v ih (2.2 to 2.4 min) in electrical characteristics tables. 1.1.2 changed i sleep max @ 3.3v from 0.40ma to 0.60 ma and @ 5v from 0.40 to 3.00ma 1.1.3 deleted v oh @ i out =6ma. changed condition on icc from cl k=35mhz to ?ext clock=2mhz?. changed t rda from min =30ns to 35ns. changed max v ol @5v from 0.4 to 0.55v. changed min v oh @5v from 4.0 to 2.4v. 1.1.4 updated values of ac electrical characteristics (t as , t ah , t cs , t rd , t ads , t adh , t wds , t wdh ). added exar?s uart technical support e-mail address to first and last page. 1.2.0 (april 2004) added device status to ordering information and date to revision history. changed to single col - umn format. clarified pin descriptions- changed from using logic 1 and logic 0 to high (vcc) and low (gnd) for input and output pin descriptions. added voh vs. ioh and vol vs. iol curves ( figure 16 and figure 17 ). clarified transmit and receive interrupt timing diagrams ( figure 21 - figure 24 ). drev regis - ter was updated to 0x08 for devices with top mark date code of "h2 yyww". 1.2.1 (february 2005) corrected trigger table selectio n and programmable trigger level selection in table 14 . 1.2.2 (october 2005) clarified wake-up interrupt in sleep mode description.
xr xr16l788 rev. 1.2.2 high performance 2.97v to 5.5v octal uart i general description ....... ................. ................ ................ ............... .............. .......... 1 a pplications .............................................................................................................................. ............. 1 f eatures .............................................................................................................................. .................. 1 figure 1. block diagram .............................. ........................................................................ ................... 1 figure 2. pin out of the devi ce .............................................................................................. ................ 2 ordering information ........................................................................................................................... 2 pin descriptions ........ ................. ................ ................ ................. ................ ............. 3 1.0 description ............................................................................................................... ......................... 7 2.0 functional descriptions ................................................................................................... ..................... 7 2.1 d evice r eset .............................................................................................................................. ........................ 7 2.2 uart c hannel s election .............................................................................................................................. .... 7 t able 1: uart c hannel s election ...................................................................................................... 7 2.3 s imultaneous w rite to a ll c hannels .............................................................................................................. 7 2.4 int# o uput .............................................................................................................................. ........................... 8 t able 2: int# p in o peration for t ransmitter ................................................................................... 8 t able 3: int# p in o peration f or r eceiver ........................................................................................ 8 2.5 crystal oscillator / buffer ........................ ....................................................................... .................... 8 figure 3. typical oscillator connections ..................................................................................... ............ 8 2.6 p rogrammable b aud r ate g enerator ............................................................................................................. 9 figure 4. external clock connecti on for extended data rate ............................................................... 9 figure 5. baud rate generator ................................................................................................ .............. 9 t able 4: t ypical data rates with a 14.7456 mh z crystal or external clock at 16x s ampling .. 10 2.7 t ransmitter .............................................................................................................................. ........................ 10 figure 6. transmitter operation in non-fifo mo de ............................................................................. 11 figure 7. transmitter operation in fifo and flow control mode ........................................................ 11 2.8 r eceiver .............................................................................................................................. ............................. 11 figure 8. receiver operation in non-fifo mode ................................................................................ . 12 figure 9. receiver operation in fifo and auto rts flow control mode ........................................... 12 2.9 thr and rhr r egister l ocations ................................................................................................................. 13 t able 5: t ransmit and r eceive h olding r egister l ocations , 16c550 compatible ....................... 13 2.10 a utomatic rts/dtr h ardware f low c ontrol o peration ........................................................................ 13 figure 10. auto rts/dtr and cts/dsr flow contro l operation ...................................................... 15 2.11 a uto x on /x off (s oftware ) f low c ontrol .................................................................................................. 16 t able 6: a uto x on /x off (s oftware ) f low c ontrol ........................................................................ 16 2.12 s pecial c haracter d etect .......................................................................................................................... 16 2.13 a uto rs485 h alf - duplex c ontrol .............................................................................................................. 16 2.14 i nfrared m ode .............................................................................................................................. ................. 17 figure 11. infrared transmit data encoding and receive data decodi ng .......................................... 17 2.15 s leep m ode with a uto w ake -u p .................................................................................................................. 18 2.16 i nternal l oopback .............................................................................................................................. ........... 19 figure 12. internal loop back ................................................................................................ .............. 19 3.0 xr16l788 registers ....................................................................................................... ................ 20 figure 13. the xr16l788 registers ............................................................................................ ........ 20 3.1 device configuration register set ................................................................................. 20 t able 7: xr16l788 r egister s ets .................................................................................................... 20 t able 8: d evice c onfiguration r egisters ........................................................................................ 21 figure 14. the global interrupt registers, int0, in t1, int2 and int3 ............................................... 22 t able 9: uart c hannel [7:0] i nterrupt s ource e ncoding and c learing ...................................... 23 figure 15. timer/counter circuit ............................................................................................. .............. 23 t able 10: timer control r egister ............................................................................................... 24 3.2 uart channel configuration registers ...................................................................................... .... 27 t able 11: uart channel configuration register s ............................................................ 27 t able 12: uart channel configuration registers description. s haded bits are enabled by efr b it -4. ........................................................................................................................... ............. 28 4.0 internal register descriptions .................. .......................................................................... ............... 29 4.1 r eceive h olding r egister (rhr) - r ead o nly .............................................................................................. 29 4.2 t ransmit h olding r egister (thr) - w rite o nly ........................................................................................... 29
xr16l788 xr high performance 2.97v to 5.5v octal uart rev. 1.2.2 ii 4.3 i nterrupt e nable r egister (ier) - r ead /w rite ............................................................................................. 29 4.4 i nterrupt s tatus r egister (isr) - r ead o nly .............................................................................................. 30 t able 13: i nterrupt s ource and p riority l evel .............................................................................. 31 4.5 fifo c ontrol r egister (fcr) - w rite o nly ................................................................................................. 32 t able 14: t ransmit and r eceive fifo t rigger t able and l evel s election ................................... 33 4.6 l ine c ontrol r egister (lcr) - r ead /w rite ................................................................................................... 33 t able 15: p arity selection ................................................................................................................. 34 4.7 m odem c ontrol r egister (mcr) - r ead /w rite ............................................................................................. 35 4.8 l ine s tatus r egister (lsr) - r ead o nly ....................................................................................................... 36 4.9 m odem s tatus r egister (msr) - r ead o nly ................................................................................................. 36 4.10 m odem s tatus r egister (msr) - w rite o nly .............................................................................................. 37 t able 16: a uto rs485 h alf - duplex d irection c ontrol d elay from t ransmit - to -r eceive .......... 38 4.11 scratch pad register (spr) - r ead /w rite .......................................................................................... 38 4.12 feature control register (fctr) - r ead /w rite .............................................................................. 38 t able 17: 16 s electable h ysteresis l evels w hen t rigger t able -d is s elected ......................... 39 4.13 e nhanced f eature r egister (efr) - r ead /w rite ........................................................................................ 40 t able 18: s oftware f low c ontrol f unctions ................................................................................. 40 4.14 txcnt[7:0]: t ransmit fifo l evel c ounter - r ead o nly ............................................................................ 41 4.15 txtrg [7:0]: t ransmit fifo t rigger l evel - w rite o nly ........................................................................... 41 4.16 rxcnt[7:0]: r eceive fifo l evel c ounter - r ead o nly .............................................................................. 42 4.17 rxtrg[7:0]: r eceive fifo t rigger l evel - w rite o nly ............................................................................. 42 t able 19: uart reset conditions ............... ................ ................. ................ ............. ............ ...... 43 absolute maximum ratings .......... ................ ................ ............... .............. .......... 44 electrical characteristics ....... ................ ................ ............... .............. .......... 44 dc e lectrical c haracteristics ......................................................................................................... 44 figure 16. xr16l788 vol sink current chart .... ............................................................................... . 45 figure 17. xr16l788 voh source current chart ............................................................................... 4 5 ac e lectrical c haracteristics .......................................................................................................... 46 figure 18. 16 mode (intel) data bus read and write timing ............................................................... 47 figure 19. 68 mode (motorola) data bus read and write timing ....................................................... 48 figure 20. modem input/output timing ............. ............................................................................ ....... 49 figure 21. receive interrupt timing [non-fifo mode ] ........................................................................ 4 9 figure 22. transmit interrupt timing [non-fifo mo de] ....................................................................... 5 0 figure 23. receive interrupt timing [fifo mode ] .............................................................................. .. 50 figure 24. transmit interrupt timing [fifo mode ] ............................................................................. .. 50 package dimensions ....... ................. ................ ................ ............... .............. .......... 51 r evision h istory .............................................................................................................................. .... 52


▲Up To Search▲   

 
Price & Availability of XR16L78805

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X